Struct syntax::parse::lexer::StringReader [−][src]
pub struct StringReader<'a> { pub sess: &'a ParseSess, pub next_pos: BytePos, pub pos: BytePos, pub col: CharPos, pub ch: Option<char>, pub filemap: Lrc<FileMap>, pub terminator: Option<BytePos>, pub save_new_lines_and_multibyte: bool, pub peek_tok: Token, pub peek_span: Span, pub fatal_errs: Vec<DiagnosticBuilder<'a>>, source_text: Lrc<String>, token: Token, span: Span, open_braces: Vec<(DelimToken, Span)>, pub override_span: Option<Span>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
sess: &'a ParseSess
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
next_pos: BytePos
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The absolute offset within the codemap of the next character to read
pos: BytePos
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The absolute offset within the codemap of the current character
col: CharPos
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The column of the next character to read
ch: Option<char>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The current character (which has been read from self.pos)
filemap: Lrc<FileMap>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
terminator: Option<BytePos>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
If Some, stop reading the source at this position (inclusive).
save_new_lines_and_multibyte: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Whether to record new-lines and multibyte chars in filemap. This is only necessary the first time a filemap is lexed. If part of a filemap is being re-lexed, this should be set to false.
peek_tok: Token
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
peek_span: Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fatal_errs: Vec<DiagnosticBuilder<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
source_text: Lrc<String>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
token: Token
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Stack of open delimiters and their spans. Used for error message.
span: Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
open_braces: Vec<(DelimToken, Span)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
override_span: Option<Span>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a> StringReader<'a>
[src]
impl<'a> StringReader<'a>
pub fn parse_all_token_trees(&mut self) -> PResult<'a, TokenStream>
[src]
pub fn parse_all_token_trees(&mut self) -> PResult<'a, TokenStream>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn parse_token_trees_until_close_delim(&mut self) -> TokenStream
[src]
fn parse_token_trees_until_close_delim(&mut self) -> TokenStream
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn parse_token_tree(&mut self) -> PResult<'a, TokenTree>
[src]
fn parse_token_tree(&mut self) -> PResult<'a, TokenTree>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> StringReader<'a>
[src]
impl<'a> StringReader<'a>
fn mk_sp(&self, lo: BytePos, hi: BytePos) -> Span
[src]
fn mk_sp(&self, lo: BytePos, hi: BytePos) -> Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn mk_ident(&self, string: &str) -> Ident
[src]
fn mk_ident(&self, string: &str) -> Ident
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn next_token(&mut self) -> TokenAndSpan where
Self: Sized,
[src]
fn next_token(&mut self) -> TokenAndSpan where
Self: Sized,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn unwrap_or_abort(&mut self, res: Result<TokenAndSpan, ()>) -> TokenAndSpan
[src]
fn unwrap_or_abort(&mut self, res: Result<TokenAndSpan, ()>) -> TokenAndSpan
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_real_token(&mut self) -> Result<TokenAndSpan, ()>
[src]
fn try_real_token(&mut self) -> Result<TokenAndSpan, ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn real_token(&mut self) -> TokenAndSpan
[src]
pub fn real_token(&mut self) -> TokenAndSpan
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn is_eof(&self) -> bool
[src]
fn is_eof(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn try_next_token(&mut self) -> Result<TokenAndSpan, ()>
[src]
pub fn try_next_token(&mut self) -> Result<TokenAndSpan, ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Return the next token. EFFECT: advances the string_reader.
fn fail_unterminated_raw_string(&self, pos: BytePos, hash_count: u16)
[src]
fn fail_unterminated_raw_string(&self, pos: BytePos, hash_count: u16)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fatal(&self, m: &str) -> FatalError
[src]
fn fatal(&self, m: &str) -> FatalError
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn emit_fatal_errors(&mut self)
[src]
pub fn emit_fatal_errors(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn peek(&self) -> TokenAndSpan
[src]
pub fn peek(&self) -> TokenAndSpan
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> StringReader<'a>
[src]
impl<'a> StringReader<'a>
pub fn new_raw(sess: &'a ParseSess, filemap: Lrc<FileMap>) -> Self
[src]
pub fn new_raw(sess: &'a ParseSess, filemap: Lrc<FileMap>) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
For comments.rs, which hackily pokes into next_pos and ch
fn new_raw_internal(sess: &'a ParseSess, filemap: Lrc<FileMap>) -> Self
[src]
fn new_raw_internal(sess: &'a ParseSess, filemap: Lrc<FileMap>) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn new(sess: &'a ParseSess, filemap: Lrc<FileMap>) -> Self
[src]
pub fn new(sess: &'a ParseSess, filemap: Lrc<FileMap>) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn retokenize(sess: &'a ParseSess, span: Span) -> Self
[src]
pub fn retokenize(sess: &'a ParseSess, span: Span) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn ch_is(&self, c: char) -> bool
[src]
pub fn ch_is(&self, c: char) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn fatal_span(&self, sp: Span, m: &str) -> FatalError
[src]
pub fn fatal_span(&self, sp: Span, m: &str) -> FatalError
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Report a fatal lexical error with a given span.
pub fn err_span(&self, sp: Span, m: &str)
[src]
pub fn err_span(&self, sp: Span, m: &str)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Report a lexical error with a given span.
fn fatal_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str) -> FatalError
[src]
fn fatal_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str) -> FatalError
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Report a fatal error spanning [from_pos
, to_pos
).
fn err_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str)
[src]
fn err_span_(&self, from_pos: BytePos, to_pos: BytePos, m: &str)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Report a lexical error spanning [from_pos
, to_pos
).
fn push_escaped_char_for_msg(m: &mut String, c: char)
[src]
fn push_escaped_char_for_msg(m: &mut String, c: char)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Pushes a character to a message string for error reporting
fn fatal_span_char(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str,
c: char
) -> FatalError
[src]
fn fatal_span_char(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str,
c: char
) -> FatalError
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Report a lexical error spanning [from_pos
, to_pos
), appending an
escaped character to the error message
fn struct_span_fatal(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str
) -> DiagnosticBuilder<'a>
[src]
fn struct_span_fatal(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str
) -> DiagnosticBuilder<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn struct_fatal_span_char(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str,
c: char
) -> DiagnosticBuilder<'a>
[src]
fn struct_fatal_span_char(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str,
c: char
) -> DiagnosticBuilder<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn err_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char)
[src]
fn err_span_char(&self, from_pos: BytePos, to_pos: BytePos, m: &str, c: char)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Report a lexical error spanning [from_pos
, to_pos
), appending an
escaped character to the error message
fn struct_err_span_char(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str,
c: char
) -> DiagnosticBuilder<'a>
[src]
fn struct_err_span_char(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: &str,
c: char
) -> DiagnosticBuilder<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fatal_span_verbose(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: String
) -> FatalError
[src]
fn fatal_span_verbose(
&self,
from_pos: BytePos,
to_pos: BytePos,
m: String
) -> FatalError
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Report a lexical error spanning [from_pos
, to_pos
), appending the
offending string to the error message
fn advance_token(&mut self) -> Result<(), ()>
[src]
fn advance_token(&mut self) -> Result<(), ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Advance peek_tok and peek_span to refer to the next token, and possibly update the interner.
fn byte_offset(&self, pos: BytePos) -> BytePos
[src]
fn byte_offset(&self, pos: BytePos) -> BytePos
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn with_str_from<T, F>(&self, start: BytePos, f: F) -> T where
F: FnOnce(&str) -> T,
[src]
pub fn with_str_from<T, F>(&self, start: BytePos, f: F) -> T where
F: FnOnce(&str) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Calls f
with a string slice of the source text spanning from start
up to but excluding self.pos
, meaning the slice does not include
the character self.ch
.
pub fn name_from(&self, start: BytePos) -> Name
[src]
pub fn name_from(&self, start: BytePos) -> Name
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create a Name from a given offset to the current offset, each adjusted 1 towards each other (assumes that on either side there is a single-byte delimiter).
pub fn name_from_to(&self, start: BytePos, end: BytePos) -> Name
[src]
pub fn name_from_to(&self, start: BytePos, end: BytePos) -> Name
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
As name_from, with an explicit endpoint.
fn with_str_from_to<T, F>(&self, start: BytePos, end: BytePos, f: F) -> T where
F: FnOnce(&str) -> T,
[src]
fn with_str_from_to<T, F>(&self, start: BytePos, end: BytePos, f: F) -> T where
F: FnOnce(&str) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Calls f
with a string slice of the source text spanning from start
up to but excluding end
.
fn translate_crlf<'b>(
&self,
start: BytePos,
s: &'b str,
errmsg: &'b str
) -> Cow<'b, str>
[src]
fn translate_crlf<'b>(
&self,
start: BytePos,
s: &'b str,
errmsg: &'b str
) -> Cow<'b, str>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Converts CRLF to LF in the given string, raising an error on bare CR.
pub fn bump(&mut self)
[src]
pub fn bump(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Advance the StringReader by one character. If a newline is discovered, add it to the FileMap's list of line start offsets.
pub fn nextch(&self) -> Option<char>
[src]
pub fn nextch(&self) -> Option<char>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn nextch_is(&self, c: char) -> bool
[src]
pub fn nextch_is(&self, c: char) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn nextnextch(&self) -> Option<char>
[src]
pub fn nextnextch(&self) -> Option<char>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn nextnextch_is(&self, c: char) -> bool
[src]
pub fn nextnextch_is(&self, c: char) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn scan_optional_raw_name(&mut self) -> Option<Name>
[src]
fn scan_optional_raw_name(&mut self) -> Option<Name>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Eats <XID_start><XID_continue>*, if possible.
fn scan_comment(&mut self) -> Option<TokenAndSpan>
[src]
fn scan_comment(&mut self) -> Option<TokenAndSpan>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
PRECONDITION: self.ch is not whitespace Eats any kind of comment.
fn scan_whitespace_or_comment(&mut self) -> Option<TokenAndSpan>
[src]
fn scan_whitespace_or_comment(&mut self) -> Option<TokenAndSpan>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
If there is whitespace, shebang, or a comment, scan it. Otherwise, return None.
fn scan_block_comment(&mut self) -> Option<TokenAndSpan>
[src]
fn scan_block_comment(&mut self) -> Option<TokenAndSpan>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Might return a sugared-doc-attr
fn scan_digits(&mut self, real_radix: u32, scan_radix: u32) -> usize
[src]
fn scan_digits(&mut self, real_radix: u32, scan_radix: u32) -> usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Scan through any digits (base scan_radix
) or underscores,
and return how many digits there were.
real_radix
represents the true radix of the number we're
interested in, and errors will be emitted for any digits
between real_radix
and scan_radix
.
fn scan_number(&mut self, c: char) -> Lit
[src]
fn scan_number(&mut self, c: char) -> Lit
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Lex a LIT_INTEGER or a LIT_FLOAT
fn scan_hex_digits(
&mut self,
n_digits: usize,
delim: char,
below_0x7f_only: bool
) -> bool
[src]
fn scan_hex_digits(
&mut self,
n_digits: usize,
delim: char,
below_0x7f_only: bool
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Scan over n_digits
hex digits, stopping at delim
, reporting an
error if too many or too few digits are encountered.
fn scan_char_or_byte(
&mut self,
start: BytePos,
first_source_char: char,
ascii_only: bool,
delim: char
) -> bool
[src]
fn scan_char_or_byte(
&mut self,
start: BytePos,
first_source_char: char,
ascii_only: bool,
delim: char
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Scan for a single (possibly escaped) byte or char
in a byte, (non-raw) byte string, char, or (non-raw) string literal.
start
is the position of first_source_char
, which is already consumed.
Returns true if there was a valid char/byte, false otherwise.
fn scan_unicode_escape(&mut self, delim: char) -> bool
[src]
fn scan_unicode_escape(&mut self, delim: char) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Scan over a \u{...}
escape
At this point, we have already seen the \
and the u
, the {
is the current character.
We will read a hex number (with _
separators), with 1 to 6 actual digits,
and pass over the }
.
fn scan_float_exponent(&mut self)
[src]
fn scan_float_exponent(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Scan over a float exponent.
fn check_float_base(
&mut self,
start_bpos: BytePos,
last_bpos: BytePos,
base: usize
)
[src]
fn check_float_base(
&mut self,
start_bpos: BytePos,
last_bpos: BytePos,
base: usize
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Check that a base is valid for a floating literal, emitting a nice error if it isn't.
fn binop(&mut self, op: BinOpToken) -> Token
[src]
fn binop(&mut self, op: BinOpToken) -> Token
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn next_token_inner(&mut self) -> Result<Token, ()>
[src]
fn next_token_inner(&mut self) -> Result<Token, ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Return the next token from the string, advances the input past that token, and updates the interner
fn consume_whitespace(&mut self)
[src]
fn consume_whitespace(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn read_to_eol(&mut self) -> String
[src]
fn read_to_eol(&mut self) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn read_one_line_comment(&mut self) -> String
[src]
fn read_one_line_comment(&mut self) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn consume_non_eol_whitespace(&mut self)
[src]
fn consume_non_eol_whitespace(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn peeking_at_comment(&self) -> bool
[src]
fn peeking_at_comment(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn scan_byte(&mut self) -> Lit
[src]
fn scan_byte(&mut self) -> Lit
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn scan_byte_escape(&mut self, delim: char, below_0x7f_only: bool) -> bool
[src]
fn scan_byte_escape(&mut self, delim: char, below_0x7f_only: bool) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn scan_byte_string(&mut self) -> Lit
[src]
fn scan_byte_string(&mut self) -> Lit
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn scan_raw_byte_string(&mut self) -> Lit
[src]
fn scan_raw_byte_string(&mut self) -> Lit
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Auto Trait Implementations
impl<'a> !Send for StringReader<'a>
impl<'a> !Send for StringReader<'a>
impl<'a> !Sync for StringReader<'a>
impl<'a> !Sync for StringReader<'a>