Crate rustc_parse
source ·Expand description
The main parser interface.
Modules§
- errors 🔒
- Meta-syntax validation logic of attributes for post-expansion.
Macros§
- If the next tokens are ill-formed
$ty::
recover them as<$ty>::
.
Constants§
Statics§
- Raw content of Fluent resource for this crate, generated by
fluent_messages
macro, imported byrustc_driver
to include all crates’ resources in one bundle.
Functions§
- 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. - Given a session and a
source_file
, return a parser. Returns any buffered errors from lexing the initial token stream. - Creates a new parser from a source string. On failure, the errors must be consumed via
unwrap_or_emit_fatal
,emit
,cancel
, etc., otherwise a panic will occur when they are dropped. - Runs the given subparser
f
on the tokens of the givenattr
’s item. - Given a source file, produces a sequence of token trees. Returns any buffered errors from parsing the token stream.