[−][src]Struct syntax::parse::lexer::StringReader
🔬 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 source_map 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 source_map of the current character
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)
source_file: Lrc<SourceFile>
🔬 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?
end_src_index: 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?
Stop reading src at this index.
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?
peek_span_src_raw: 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?
src: 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?
span_src_raw: 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?
The raw source span which does not take override_span
into account
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?
matching_delim_spans: Vec<(DelimToken, 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?
The type and spans for all braces
Used only for error recovery when arriving to EOF with mismatched braces.
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?
last_unclosed_found_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(crate) fn parse_all_token_trees(&mut self) -> PResult<'a, TokenStream>
[src]
pub(crate) 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, TokenStream>
[src]
fn parse_token_tree(&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?
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_sp_and_raw(&self, lo: BytePos, hi: BytePos) -> (Span, Span)
[src]
fn mk_sp_and_raw(&self, lo: BytePos, hi: BytePos) -> (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?
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 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 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?
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 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?
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?
fn new_raw(
sess: &'a ParseSess,
source_file: Lrc<SourceFile>,
override_span: Option<Span>
) -> Self
[src]
fn new_raw(
sess: &'a ParseSess,
source_file: Lrc<SourceFile>,
override_span: Option<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?
For comments.rs, which hackily pokes into next_pos and ch
fn new_raw_internal(
sess: &'a ParseSess,
source_file: Lrc<SourceFile>,
override_span: Option<Span>
) -> Self
[src]
fn new_raw_internal(
sess: &'a ParseSess,
source_file: Lrc<SourceFile>,
override_span: Option<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 new(
sess: &'a ParseSess,
source_file: Lrc<SourceFile>,
override_span: Option<Span>
) -> Self
[src]
pub fn new(
sess: &'a ParseSess,
source_file: Lrc<SourceFile>,
override_span: Option<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 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?
fn ch_is(&self, c: char) -> bool
[src]
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?
fn fatal_span(&self, sp: Span, m: &str) -> FatalError
[src]
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.
fn err_span(&self, sp: Span, m: &str)
[src]
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 src_index(&self, pos: BytePos) -> usize
[src]
fn src_index(&self, pos: BytePos) -> 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?
fn with_str_from<T, F>(&self, start: BytePos, f: F) -> T where
F: FnOnce(&str) -> T,
[src]
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
.
fn name_from(&self, start: BytePos) -> Name
[src]
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).
fn name_from_to(&self, start: BytePos, end: BytePos) -> Name
[src]
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(crate) fn bump(&mut self)
[src]
pub(crate) 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 SourceFile's list of line start offsets.
fn nextch(&self) -> Option<char>
[src]
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?
fn nextch_is(&self, c: char) -> bool
[src]
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?
fn nextnextch(&self) -> Option<char>
[src]
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?
fn nextnextch_is(&self, c: char) -> bool
[src]
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>
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T