atproto_mlf/parser

Recursive-descent parser over the lexer’s token stream. Every helper takes the remaining token list and returns #(value, rest) on success, threading the list explicitly (no combinator library). The grammar follows tree-sitter-mlf: items (record / def type / inline type / token / query / procedure / subscription / self / use), fields with ! required markers, constrained { } blocks, | unions with a closing !, arrays, annotations, and use imports.

Types

pub type Tokens =
  List(#(token.Token, token.Span))

Values

pub fn parse_items(
  tokens: List(#(token.Token, token.Span)),
) -> Result(List(mlf_ast.Item), error.ParseError)
Search Document