parser

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NormalMode int = iota
	REPLMode
	TestMode
)

These are the enums for marking parser's mode, which decides whether it should pop unused values.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	Lexer *lexer.Lexer

	Mode int
	// contains filtered or unexported fields
}

Parser represents lexical analyzer struct

func New

func New(l *lexer.Lexer) *Parser

New initializes a parser and returns it

func (*Parser) ParseProgram

func (p *Parser) ParseProgram() (*ast.Program, *errors.Error)

ParseProgram update program statements and return program

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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