Struct esparse::lex::Stream [] [src]

pub struct Stream<'s> { /* fields omitted */ }

Generic stream structure for source code.

A Stream advances over its input one character at a time, tracking line and column information and providing two characters of lookahead.

Methods

impl<'s> Stream<'s>
[src]

Creates a new Stream on the given input.

true if and only if the current character is c.

Advances to the next character if and only if the current character is c.

Advances by two characters if and only if the current character is c and the next character is d.

Advances to the next character until the stream ends or f returns false for the current character.

Advances past any binary digits (0 or 1).

Advances past any octal digits (0 through 7).

Advances past any decimal digits (0 through 9).

Advances past any hexadecimal digits (0 through 9 and a through f, case insensitive).

Advances past any characters in the Unicode category ID_Continue.

Advances past any whitespace or JavaScript comments.

The bytewise position of the current character.

The location of the current character.

The current character, or None if the stream has reached the end of its input.

The next character, or None if the stream has reached the end of its input.

The entire input source code.

A slice of the input source code from the byte at start up to, but not including the first byte of the current character.

A slice of the input source code from the byte at start up to, but not including the byte at end.

Advances the stream by one character, returning the character advanced past or None if the stream was already at the end of its input.

Trait Implementations

impl<'s> Debug for Stream<'s>
[src]

Formats the value using the given formatter.