[][src]Module syntax::parse

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The main parser interface.

Modules

attrInternal
classifyInternal

Routines the parser uses to classify AST nodes

lexerInternal
parserInternal
tokenInternal

Structs

DirectoryInternal
ParseSessInternal

Info about a parsing session.

SeqSepInternal

A sequence separator.

Enums

DirectoryOwnershipInternal

Functions

byte_litInternal

Parses a string representing a byte literal into its final form. Similar to char_lit.

byte_str_litInternal
char_litInternal

Parses a string representing a character literal into its final form. Rather than just accepting/rejecting a given literal, unescapes it as well. Can take any slice prefixed by a character escape. Returns the character and the number of characters consumed.

file_to_source_fileInternal

Given a session and a path and an optional span (for error reporting), add the path to the session's source_map and return the new source_file.

filtered_float_litInternal
float_litInternal
integer_litInternal
lit_tokenInternal
looks_like_width_suffixInternal
maybe_file_to_streamInternal

Given a source file, produces a sequence of token trees. Returns any buffered errors from parsing the token tream.

maybe_new_parser_from_fileInternal

Creates a new parser, returning buffered diagnostics if the file doesn't exist or from lexing the initial token stream.

maybe_new_parser_from_source_strInternal

Creates a new parser from a source string. Returns any buffered errors from lexing the initial token stream.

maybe_source_file_to_parserInternal

Given a source_file and config, return a parser. Returns any buffered errors from lexing the initial token stream.

new_parser_from_fileInternal

Creates a new parser, handling errors as appropriate if the file doesn't exist

new_parser_from_source_strInternal

Creates a new parser from a source string.

new_parser_from_ttsInternal
new_sub_parser_from_fileInternal

Given a session, a crate config, a path, and a span, add the file at the given path to the source_map, and return a parser. On an error, use the given span as the source of the problem.

parse_crate_attrs_from_fileInternal
parse_crate_attrs_from_source_strInternal
parse_crate_from_fileInternal
parse_crate_from_source_strInternal
parse_stream_from_source_strInternal
raw_str_litInternal

Parses a string representing a raw string literal into its final form. The only operation this does is convert embedded CRLF into a single LF.

source_file_to_parserInternal

Given a source_file and config, return a parser

source_file_to_streamInternal

Given a source_file, produces a sequence of token trees.

str_litInternal

Parses a string representing a string literal into its final form. Does unescaping.

stream_to_parserInternal

Given stream and the ParseSess, produces a parser.

try_file_to_source_fileInternal

Given a session and a path and an optional span (for error reporting), add the path to the session's source_map and return the new source_file or error when a file can't be read.

Type Definitions

PResultInternal