Documentation
¶
Index ¶
- type Converter
- type Parser
- func (p *Parser) Debug(b bool)
- func (p *Parser) Parse(prog string) (*nast.Program, error)
- func (p *Parser) ParseBlockStatement() *nast.BlockStatement
- func (p *Parser) ParseConstantDeclaration() *nast.ConstDeclaration
- func (p *Parser) ParseExecutableLine() nast.ExecutableLine
- func (p *Parser) ParseFuncCall() ast.Expression
- func (p *Parser) ParseGoto() ast.Statement
- func (p *Parser) ParseIf() ast.Statement
- func (p *Parser) ParseLine() nast.Line
- func (p *Parser) ParseLinesUntil(stop func() bool) []nast.ExecutableLine
- func (p *Parser) ParseMultilineIf() nast.Line
- func (p *Parser) ParseProgram() *nast.Program
- func (p *Parser) ParseStatementLine() *nast.StatementLine
- func (p *Parser) ParseWhile() nast.Line
- type Printer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter can convert a nolol-ast to a yolol-ast
func (*Converter) ConvertFromSource ¶
ConvertFromSource is a shortcut that parses and directly convertes a nolol program
type Parser ¶
Parser parses a nolol-program
func (*Parser) ParseBlockStatement ¶ added in v0.0.6
func (p *Parser) ParseBlockStatement() *nast.BlockStatement
ParseBlockStatement parses a NOLOL block statement
func (*Parser) ParseConstantDeclaration ¶
func (p *Parser) ParseConstantDeclaration() *nast.ConstDeclaration
ParseConstantDeclaration parses a constant declaration
func (*Parser) ParseExecutableLine ¶
func (p *Parser) ParseExecutableLine() nast.ExecutableLine
ParseExecutableLine parses an if, while or statement-line
func (*Parser) ParseFuncCall ¶ added in v0.0.6
func (p *Parser) ParseFuncCall() ast.Expression
ParseFuncCall parse a function call
func (*Parser) ParseLinesUntil ¶
func (p *Parser) ParseLinesUntil(stop func() bool) []nast.ExecutableLine
ParseLinesUntil parse lines until stop() returns true
func (*Parser) ParseMultilineIf ¶
ParseMultilineIf parses a nolol-style multiline if
func (*Parser) ParseProgram ¶
ParseProgram parses the program
func (*Parser) ParseStatementLine ¶
func (p *Parser) ParseStatementLine() *nast.StatementLine
ParseStatementLine parses a statement line
Click to show internal directories.
Click to hide internal directories.