Help us shape the future of Go! Take the 2026 Go Developer Survey

parser

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOWEST_PRECEDENCE = 0
	LOWEST            = 1
	WALRUS_EXPR       = 2 // := binds looser than everything except another :=
	CONDITIONAL       = 3 // for conditional expressions (x if cond else y)
	OR                = 4
	BIT_OR            = 5
	BIT_XOR           = 6
	BIT_AND           = 7
	AND               = 8
	EQUALS            = 9
	LESSGREATER       = 10
	BIT_SHIFT         = 11
	SUM               = 12
	PRODUCT           = 13
	POWER             = 14
	PREFIX            = 15
	CALL              = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New(l *lexer.Lexer) *Parser

func (*Parser) Errors

func (p *Parser) Errors() []string

func (*Parser) ParseProgram

func (p *Parser) ParseProgram() *ast.Program

func (*Parser) Reset added in v0.5.6

func (p *Parser) Reset(l *lexer.Lexer)

Jump to

Keyboard shortcuts

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