Documentation ¶
Index ¶
- Constants
- type ArrayLiteralNode
- type Binary
- type BlockStmtNode
- type BooleanNode
- type CallExprNode
- type Expression
- type ExpressionStmtNode
- type FunLiteralNode
- type HashLiteralNode
- type IdentifierNode
- type IfExprNode
- type IndexExprNode
- type IntegerNode
- type LetStmtNode
- type Node
- type NullNode
- type ProgramNode
- type ReturnStmtNode
- type Statement
- type StringNode
- type Type
- type Unary
- type WhileStmtNode
Constants ¶
View Source
const ( // contenedores PROGRAM = iota BLOCK EXPRESSION // tipos nativos INT IDENT STRING BOOLEAN NULL // computadores BINARY UNARY // control de flujo IF FUNCTION LET RETURN WHILE ARRAY HASH INDEX CALL )
El tipo de ast
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLiteralNode ¶
type ArrayLiteralNode struct {
Elements []Expression
}
func (*ArrayLiteralNode) String ¶
func (an *ArrayLiteralNode) String() string
func (*ArrayLiteralNode) Type ¶
func (an *ArrayLiteralNode) Type() Type
type BlockStmtNode ¶
type BlockStmtNode struct {
Statements []Statement
}
func (*BlockStmtNode) String ¶
func (b *BlockStmtNode) String() string
func (*BlockStmtNode) Type ¶
func (b *BlockStmtNode) Type() Type
type BooleanNode ¶
type BooleanNode struct {
Value bool
}
func (*BooleanNode) String ¶
func (bn *BooleanNode) String() string
func (*BooleanNode) Type ¶
func (bn *BooleanNode) Type() Type
type CallExprNode ¶
type CallExprNode struct { Callee Expression Arguments []Expression }
func (*CallExprNode) String ¶
func (cn *CallExprNode) String() string
func (*CallExprNode) Type ¶
func (cn *CallExprNode) Type() Type
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
type ExpressionStmtNode ¶
type ExpressionStmtNode struct {
Expression Expression
}
func (*ExpressionStmtNode) String ¶
func (e *ExpressionStmtNode) String() string
func (*ExpressionStmtNode) Type ¶
func (e *ExpressionStmtNode) Type() Type
type FunLiteralNode ¶
type FunLiteralNode struct { Parameters []IdentifierNode Body *BlockStmtNode }
func (*FunLiteralNode) String ¶
func (fl *FunLiteralNode) String() string
func (*FunLiteralNode) Type ¶
func (fl *FunLiteralNode) Type() Type
type HashLiteralNode ¶
type HashLiteralNode struct {
Pairs map[Expression]Expression
}
func (*HashLiteralNode) String ¶
func (hn *HashLiteralNode) String() string
func (*HashLiteralNode) Type ¶
func (hn *HashLiteralNode) Type() Type
type IdentifierNode ¶
type IdentifierNode struct {
Value string
}
tipos nativos
func (*IdentifierNode) String ¶
func (id *IdentifierNode) String() string
func (*IdentifierNode) Type ¶
func (id *IdentifierNode) Type() Type
type IfExprNode ¶
type IfExprNode struct { Condition Expression Consequence *BlockStmtNode Alternative *BlockStmtNode }
controladores de flujo
func (*IfExprNode) String ¶
func (i *IfExprNode) String() string
func (*IfExprNode) Type ¶
func (i *IfExprNode) Type() Type
type IndexExprNode ¶
type IndexExprNode struct { Callee Expression Index Expression }
func (*IndexExprNode) String ¶
func (cn *IndexExprNode) String() string
func (*IndexExprNode) Type ¶
func (cn *IndexExprNode) Type() Type
type IntegerNode ¶
type IntegerNode struct {
Value int64
}
func (*IntegerNode) String ¶
func (in *IntegerNode) String() string
func (*IntegerNode) Type ¶
func (in *IntegerNode) Type() Type
type LetStmtNode ¶
type LetStmtNode struct { Name IdentifierNode Value Expression }
Sentencias
func (*LetStmtNode) String ¶
func (ls *LetStmtNode) String() string
func (*LetStmtNode) Type ¶
func (ls *LetStmtNode) Type() Type
type ProgramNode ¶
type ProgramNode struct {
Statements []Statement
}
contenedores de sentencias
func (*ProgramNode) String ¶
func (p *ProgramNode) String() string
func (*ProgramNode) Type ¶
func (p *ProgramNode) Type() Type
type ReturnStmtNode ¶
type ReturnStmtNode struct {
Value Expression
}
func (*ReturnStmtNode) String ¶
func (rs *ReturnStmtNode) String() string
func (*ReturnStmtNode) Type ¶
func (rs *ReturnStmtNode) Type() Type
type StringNode ¶
type StringNode struct {
Value string
}
func (*StringNode) String ¶
func (sn *StringNode) String() string
func (*StringNode) Type ¶
func (sn *StringNode) Type() Type
type Unary ¶
type Unary struct { Op token.Token Right Expression }
type WhileStmtNode ¶
type WhileStmtNode struct { Condition Expression Body *BlockStmtNode }
func (*WhileStmtNode) String ¶
func (ws *WhileStmtNode) String() string
func (*WhileStmtNode) Type ¶
func (ws *WhileStmtNode) Type() Type
Click to show internal directories.
Click to hide internal directories.