parser

package
v0.0.0-...-9c1be47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(stmts gnode.Stmts) (_ []byte, err error)

Format writes giom statements as formatted GAD output.

func ParseCallArgsStringForTest

func ParseCallArgsStringForTest(s string) (*node.CallArgs, error)

func ParseFuncParamsStringForTest

func ParseFuncParamsStringForTest(s string) (*node.FuncParams, error)

Types

type Parser

type Parser struct {
	Errors gadparser.ErrorList

	Token     gadparser.PToken
	PrevToken gadparser.PToken
	// contains filtered or unexported fields
}

Parser parses giom template source into AST nodes.

func NewParser

func NewParser(file *source.File) *Parser

NewParser creates a new Parser for the given source file.

func (*Parser) Error

func (p *Parser) Error(pos source.Pos, msg string)

func (*Parser) Next

func (p *Parser) Next()

Next advances the scanner and stores the current and previous tokens.

func (*Parser) ParseFile

func (p *Parser) ParseFile() (_ *giomnode.File, err error)

ParseFile parses the entire giom source file into a File AST node.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL