parser

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 11 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode added in v0.1.13

type Mode int

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

const (
	NormalMode Mode = iota + 1
	REPLMode
	TestMode
)

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

type Parser

type Parser struct {
	Lexer *lexer.Lexer

	Mode Mode
	// 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) IsNotDefMethodToken added in v0.1.9

func (p *Parser) IsNotDefMethodToken() bool

IsNotDefMethodToken ensures correct naming in Def statement

func (*Parser) IsNotParamsToken added in v0.1.9

func (p *Parser) IsNotParamsToken() bool

IsNotParamsToken ensures correct parameters which means it is not InstanceVariable

func (*Parser) ParseProgram

func (p *Parser) ParseProgram() (program *ast.Program, err *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