Skip to main content

Module parser

Module parser 

Source

Modules§

format

Structs§

Rule

Enums§

Lang
SyntaxKind

Functions§

first_tokens
min_error_for_token
Returns the minimum error cost that kind must incur when tok is the current token. 0 means the token is reachable (or the rule is nullable); positive means the rule cannot make progress without at least that much error cost.
state_dist
Precomputed dist(q, a): minimum insertion cost to reach a point where terminal terminal can be matched, starting from parser state (kind, state). Returns 0 as the conservative default (admissible — parent context might accept the terminal after a pop).

Type Aliases§

SyntaxNode