Skip to main content

Crate zerodds_idl_cst

Crate zerodds_idl_cst 

Source
Expand description

Crate zerodds-idl-cst. Safety classification: SAFE.

The lossless concrete syntax tree for OMG IDL 4.2: tokens that carry their trivia, and a green/red tree that reproduces its input byte for byte — including for files that fail to parse, because error recovery inserts nodes rather than dropping input.

This crate holds the tree. The parser that builds it is zerodds-idl-parse; the lowering that consumes it is zerodds-idl-lower.

§Spec

  • docs/specs/zerodds-idl-frontend-1.0.md §1 (lexing), §2 (the tree).
  • OMG IDL 4.2 §7.2 (lexical conventions), §7.4 (grammar).

§Layer position

Layer 0 of the frontend — no dependencies.

Re-exports§

pub use lex::Lexer;
pub use lex::lex;
pub use lex::literal_value;
pub use span::LineColumn;
pub use span::Span;
pub use token::KEYWORDS;
pub use token::Radix;
pub use token::Token;
pub use token::TokenKind;
pub use token::TokenValue;
pub use token::Trivia;
pub use token::TriviaKind;
pub use token::identifier_name;
pub use token::keyword_collision;
pub use tree::Checkpoint;
pub use tree::CstKind;
pub use tree::GreenChild;
pub use tree::GreenNode;
pub use tree::GreenToken;
pub use tree::SyntaxNode;
pub use tree::SyntaxSpans;
pub use tree::TreeBuilder;

Modules§

lex
The lexer. Spec §1.
span
Byte ranges into source text. Spec §1, §7.
token
Tokens and their trivia. Spec §1.
tree
The green/red tree. Spec §2.