parser

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHeaderFuncDefs added in v0.0.8

func GetHeaderFuncDefs(headers []interfaces.DatapackHeader) map[string]interfaces.FunctionDefinition

Types

type Parser

type Parser struct {
	Tokens  []tokens.Token
	Headers []interfaces.DatapackHeader

	Errors []error
	// contains filtered or unexported fields
}

func (*Parser) IsAtEnd

func (p *Parser) IsAtEnd() bool

func (*Parser) Parse

func (p *Parser) Parse() (Program, []error)

func (*Parser) ParseType added in v0.0.8

func (p *Parser) ParseType() (types.ValueType, error)

type Program

type Program struct {
	Functions map[string]statements.FunctionDeclarationStmt
	Structs   map[string]statements.StructDeclarationStmt
}

func (Program) Visit

func (p Program) Visit(visitor statements.StmtVisitor) []interface{}

Jump to

Keyboard shortcuts

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