[][src]Module syntax::parse

The main parser interface.

Modules

attr
lexer
parser
token

Structs

Directory
GatedSpans

Collected spans during parsing for places where a certain feature was used and should be feature gated accordingly in check_crate.

ParseSess

Info about a parsing session.

SeqSep

A sequence separator.

Enums

DirectoryOwnership

Functions

maybe_file_to_stream

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

maybe_new_parser_from_file

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_str

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

new_parser_from_file

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

new_parser_from_source_str

Creates a new parser from a source string.

new_parser_from_tts
new_sub_parser_from_file

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

parse_crate_attrs_from_file
parse_crate_attrs_from_source_str
parse_crate_from_file
parse_crate_from_source_str
parse_stream_from_source_str
source_file_to_stream

Given a source_file, produces a sequence of token trees.

stream_to_parser

Given a stream and the ParseSess, produces a parser.

stream_to_parser_with_base_dir

Given a stream, the ParseSess and the base directory, produces a parser.

Type Definitions

PResult