parser

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(path, input string) (*ast.Script, error)

func Print

func Print(path, input string) string

Types

type Parser

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

func New

func New(path string, l *lexer.Lexer) *Parser

func (*Parser) Accept

func (p *Parser) Accept(tokens ...token.Type) bool

Returns true if any of the given tokens are next

func (*Parser) Check

func (p *Parser) Check(tokens ...token.Type) bool

Returns true if any the given tokens are next

func (*Parser) Expect

func (p *Parser) Expect(tokens ...token.Type) error

func (*Parser) Is

func (p *Parser) Is(types ...token.Type) bool

Checks that the next token is one of the given types

func (*Parser) More

func (p *Parser) More() bool

func (*Parser) Parse

func (p *Parser) Parse() (*ast.Script, error)

func (*Parser) Text

func (p *Parser) Text() string

func (*Parser) Type

func (p *Parser) Type() token.Type

Jump to

Keyboard shortcuts

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