Skip to main content

Module parse

Module parse 

Source
Expand description

Parsing boundaries over tokenized cells and their shared token representation.

Parser consumes a whole CellStream and is the backend interface. Parse consumes one value from a ParseStream and is the generated dual of crate::Lex. Both native parsing and generated token parsing use the same cursor facts instead of maintaining parallel token arrays.

Structs§

ParseStream
An owned, cheaply forkable cursor over one immutable token stream.

Enums§

FragmentParseError
An error produced while lexing or parsing one typed syntax fragment.
TokenParseError
A failure while consuming typed syntax from a ParseStream.

Traits§

Parse
A typed syntax value that can consume itself from an M2 token cursor.
Parser
A parser backend that produces one typed syntax target.

Functions§

migrate
Migrates a typed syntax target from a parser-specific CST root.
parse2
Parses one complete token stream as T.
parse_fragment_str
Lexes one source cell and parses it as a typed syntax fragment.
parse_with
Parses an existing cell stream with an explicitly selected backend.