atproto_sdl/parser
Recursive-descent parser over the lexer’s token stream: the document
header (@description/@revision directives) and top-level items.
Type/field/param parsing lives in parser/types, ref paths and
attributes in parser/values, and raw token-stream primitives in
parser/cursor. The grammar is deliberately uniform and permissive:
position restrictions the target AST enforces turn into Semantic
errors in lower, not here. Field and parameter lists accept a
trailing comma OR no separator at all (newline-only), so
hand-written SDL isn’t forced into one style.
Values
pub fn parse_document(
tokens: List(#(token.Token, token.Span)),
) -> Result(tree.Document, error.ParseError)