Versions in this module Expand all Collapse all v0 v0.2.0 Oct 17, 2026 v0.1.0 Oct 13, 2026 Changes in this version + const LanguageVersion + const LanguageVersionWithPrimaryStates + const LanguageVersionWithReservedWords + const MinCompatibleLanguageVersion + const ParseActionTypeAccept + const ParseActionTypeRecover + const ParseActionTypeReduce + const ParseActionTypeShift + const SerializationBufferSize + const SymbolEnd + const SymbolError + const SymbolErrorRepeat + func SetContains(ranges []CharacterRange, lookahead int32) bool + func SetContainsASCII(ascii *[128]bool, ranges []CharacterRange, lookahead int32) bool + type CharacterRange struct + End int32 + Start int32 + type ExternalScanner interface + Deserialize func(buf []byte) + Scan func(l *Lexer, validSymbols []bool) bool + Serialize func(buf []byte) int + type ExternalScannerInfo struct + New func() ExternalScanner + States []bool + SymbolMap []Symbol + type FieldID uint16 + type FieldMapEntry struct + ChildIndex uint8 + FieldID FieldID + Inherited bool + type Language struct + ABIVersion uint32 + AliasCount uint32 + AliasMap []uint16 + AliasSequences []Symbol + ExternalScanner ExternalScannerInfo + ExternalTokenCount uint32 + FieldCount uint32 + FieldMapEntries []FieldMapEntry + FieldMapSlices []MapSlice + FieldNames []string + KeywordCaptureToken Symbol + KeywordLexFn LexFunc + LargeStateCount uint32 + LexFn LexFunc + LexModes []LexMode + MaxAliasSequenceLength uint16 + MaxReservedWordSetSize uint16 + Metadata LanguageMetadata + Name string + ParseActions []ParseAction + ParseTable []uint16 + PrimaryStateIDs []StateID + ProductionIDCount uint32 + PublicSymbolMap []Symbol + ReservedWords []Symbol + SmallParseTable []uint16 + SmallParseTableMap []uint32 + StateCount uint32 + SupertypeCount uint32 + SupertypeMapEntries []Symbol + SupertypeMapSlices []MapSlice + SupertypeSymbols []Symbol + SymbolCount uint32 + SymbolMetadata []SymbolMetadata + SymbolNames []string + TokenCount uint32 + func (l *Language) FieldIDForName(name string) FieldID + func (l *Language) FieldNameForID(id FieldID) string + func (l *Language) KindMask(kinds ...string) uint32 + func (l *Language) SymbolName(s Symbol) string + type LanguageMetadata struct + MajorVersion uint8 + MinorVersion uint8 + PatchVersion uint8 + type LexFunc func(l *Lexer, state StateID) bool + type LexMode struct + ExternalLexState uint16 + LexState uint16 + ReservedWordSetID uint16 + type Lexer struct + Lookahead int32 + ResultSymbol Symbol + func (l *Lexer) Advance(skip bool) + func (l *Lexer) AdvanceRun(set *[256]bool, skip bool) + func (l *Lexer) EOF() bool + func (l *Lexer) GetColumn() uint32 + func (l *Lexer) IsAtIncludedRangeStart() bool + func (l *Lexer) MarkEnd() + type LogType uint8 + const LogTypeLex + const LogTypeParse + type Logger func(t LogType, msg string) + type MapSlice struct + Index uint16 + Length uint16 + type Node struct + func (n Node) Child(i uint32) Node + func (n Node) ChildByFieldID(fieldID FieldID) Node + func (n Node) ChildByFieldName(name string) Node + func (n Node) ChildCount() uint32 + func (n Node) Children(buf []Node) []Node + func (n Node) ChildrenByFieldName(name string, c *TreeCursor) []Node + func (n Node) EndByte() uint32 + func (n Node) EndPosition() Point + func (n Node) Equals(other Node) bool + func (n Node) FieldNameForChild(childIndex uint32) string + func (n Node) HasError() bool + func (n Node) IsError() bool + func (n Node) IsExtra() bool + func (n Node) IsMissing() bool + func (n Node) IsNamed() bool + func (n Node) IsNull() bool + func (n Node) Kind() string + func (n Node) Language() *Language + func (n Node) NamedChild(i uint32) Node + func (n Node) NamedChildCount() uint32 + func (n Node) NamedChildren(buf []Node) []Node + func (n Node) Parent() Node + func (n Node) Preorder(fn func(Node) bool) + func (n Node) PreorderMask(mask uint32, fn func(Node) bool) + func (n Node) StartByte() uint32 + func (n Node) StartPosition() Point + func (n Node) String() string + func (n Node) Symbol() Symbol + func (n Node) Utf8Text(src []byte) string + func (n Node) Walk() *TreeCursor + type ParseAction struct + ChildCount uint8 + DynamicPrecedence int16 + ProductionID uint16 + Symbol Symbol + Type uint8 + func (a ParseAction) Count() uint8 + func (a ParseAction) Extra() bool + func (a ParseAction) Repetition() bool + func (a ParseAction) Reusable() bool + func (a ParseAction) State() StateID + type Parser struct + func NewParser() *Parser + func (p *Parser) Parse(src []byte) *Tree + func (p *Parser) ParseBudget(src []byte, maxStall uint32) *Tree + func (p *Parser) Reset() + func (p *Parser) SetLanguage(l *Language) error + func (p *Parser) SetLogger(fn Logger) + type Point struct + Column uint32 + Row uint32 + type StateID uint16 + type Symbol uint16 + type SymbolMetadata struct + Named bool + Supertype bool + Visible bool + type Tree struct + func (t *Tree) Close() + func (t *Tree) Language() *Language + func (t *Tree) RootNode() Node + type TreeCursor struct + func (c *TreeCursor) Close() + func (c *TreeCursor) FieldID() FieldID + func (c *TreeCursor) FieldName() string + func (c *TreeCursor) GotoFirstChild() bool + func (c *TreeCursor) GotoNextSibling() bool + func (c *TreeCursor) GotoParent() bool + func (c *TreeCursor) Node() Node + func (c *TreeCursor) Reset(n Node)