Skip to main content

Crate rustc_parse

Crate rustc_parse 

Source
Expand description

The main parser interface.

Modulesยง

errors ๐Ÿ”’
lexer
parser

Macrosยง

exp
maybe_recover_from_interpolated_ty_qpath
If the next tokens are ill-formed $ty:: recover them as <$ty>::.

Constantsยง

MACRO_ARGUMENTS
UNICODE_VERSION

Functionsยง

fake_token_stream_for_crate
fake_token_stream_for_item
new_parser_from_file
Creates a new parser from a filename. On failure, the errors must be consumed via unwrap_or_emit_fatal, emit, cancel, etc., otherwise a panic will occur when they are dropped.
new_parser_from_source_file ๐Ÿ”’
Given a session and a source_file, return a parser. Returns any buffered errors from lexing the initial token stream.
new_parser_from_source_str
Creates a new parser from a source string.
parse_in
Runs the given subparser f on the tokens of the given attrโ€™s item.
source_file_to_stream ๐Ÿ”’
Given a source file, produces a sequence of token trees.
source_str_to_stream
Given a source string, produces a sequence of token trees.
unwrap_or_emit_fatal
utf8_error