Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses tokens into an AST using recursive descent.
ARCHITECTURE NOTE: The parser uses error collection (not fail-fast). When an error is encountered, it's appended to p.errors and parsing continues. This allows reporting multiple errors in a single parse, improving UX.
The parser handles Kukicha's "context-sensitive keywords" - words like `list`, `map`, and `channel` are keywords only when followed by `of` in a type context. This lets users use these as variable names in expressions.
func NewFromTokens ¶
NewFromTokens creates a new parser from a slice of tokens
Click to show internal directories.
Click to hide internal directories.