Documentation
¶
Overview ¶
Package parser is a hand-written recursive-descent parser for the Runefile declarative grammar, with a Pratt sub-parser (expr.go) for the expression sublanguage. It consumes the lexer's token stream and produces an *ast.File, emitting spanned diagnostics on any error (Principle II).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse lexes and parses src (named file) into an *ast.File plus all lexical and syntactic diagnostics.
func ParseExprFragment ¶
ParseExprFragment parses a standalone expression (e.g. the contents of a {{ ... }} interpolation). It returns the expression and any diagnostics. Surrounding whitespace is dropped first: {{ expr }} is the documented form, and the lexer reads a leading space as an indent.
Types ¶
This section is empty.