Documentation ¶
Index ¶
- Variables
- func ADD(node Node) ast.Expr
- func ARRAY(node Node) ast.Expr
- func ASSIGN(node Node) ast.Stmt
- func Buffer(file *ast.File) (*bytes.Buffer, error)
- func DEFINE(node Node) ast.Stmt
- func EQL(node Node) ast.Expr
- func GEQ(node Node) ast.Expr
- func GTR(node Node) ast.Expr
- func IF(node Node) ast.Stmt
- func LAND(node Node) ast.Expr
- func LEQ(node Node) ast.Expr
- func LOR(node Node) ast.Expr
- func LSS(node Node) ast.Expr
- func MAP(node Node) ast.Expr
- func MUL(node Node) ast.Expr
- func NEQ(node Node) ast.Expr
- func QUO(node Node) ast.Expr
- func REM(node Node) ast.Expr
- func RETURN(node Node) ast.Stmt
- func SLICE(node Node) ast.Expr
- func SUB(node Node) ast.Expr
- func SWITCH(node Node) ast.Stmt
- func VAR(node Node) ast.Stmt
- type Node
- func (node Node) Expr() ast.Expr
- func (node Node) Field() *ast.Field
- func (node Node) FieldList() *ast.FieldList
- func (node Node) File() *ast.File
- func (node Node) Func() ast.Decl
- func (node Node) Ident() *ast.Ident
- func (node Node) Import() *ast.ImportSpec
- func (node Node) Imports() *ast.GenDecl
- func (node Node) Return() ast.Stmt
- func (node Node) Stmt() ast.Stmt
- type Parser
- type Tokenizer
- type Yal
Constants ¶
This section is empty.
Variables ¶
View Source
var Exprs map[string]func(Node) ast.Expr
View Source
var Stmts map[string]func(Node) ast.Stmt
Functions ¶
func ARRAY ¶
ARRAY returns composite literal expression for array. First node represents element type. Second node represents array size.
(array type n a b)
func ASSIGN ¶
ASSIGN returns "=" statement. Accepts multiple arguments.
(= a b c d)
Becomes:
a, c = b, d
func DEFINE ¶
DEFINE returns ":=" statement. Accepts multiple arguments.
(:= a b c d)
Becomes:
a, c := b, d
func MAP ¶
MAP generates anonymous function which applies function `f` to each element in slice `a` and returns new slice. Function `f` should have one argument and return value with same type.
(map type type f a)
func RETURN ¶
RETURN returns "return" statement. Accepts multiple arguments.
(return a b c)
Becomes:
return a, b, c
func SLICE ¶
SLICE returns composite literal expression for slice. First node represents element type.
(slice type a b)
Types ¶
Click to show internal directories.
Click to hide internal directories.