Documentation
¶
Index ¶
- type Lexer
- type Parser
- func (p *Parser) Parse() []ast.Statement
- func (p *Parser) ParseAtom() (res ast.Expression)
- func (p *Parser) ParseBlock() *ast.Block
- func (p *Parser) ParseExpression(pr byte) ast.Expression
- func (p *Parser) ParseExpressionStatement() ast.Statement
- func (p *Parser) ParseIden() ast.Expression
- func (p *Parser) ParseIfElse() *ast.IfElse
- func (p *Parser) ParseStatement() ast.Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer is the tokenizer type
type Parser ¶
type Parser struct { Error *string // contains filtered or unexported fields }
Parser is the base parsing struct
func (*Parser) ParseAtom ¶
func (p *Parser) ParseAtom() (res ast.Expression)
ParseAtom parses all literals
func (*Parser) ParseExpression ¶
func (p *Parser) ParseExpression(pr byte) ast.Expression
ParseExpression parses an expression
func (*Parser) ParseExpressionStatement ¶
ParseExpressionStatement parses an expression statement
func (*Parser) ParseIden ¶
func (p *Parser) ParseIden() ast.Expression
ParseIden parses a variable name
func (*Parser) ParseIfElse ¶
ParseIfElse parses an if, else expression
func (*Parser) ParseStatement ¶
ParseStatement parses a single statement
Click to show internal directories.
Click to hide internal directories.