Documentation ¶
Index ¶
- type AnnotationStmt
- type ArrayLiteral
- type AssignExpression
- type AwaitExpr
- type BlockStatement
- type Boolean
- type BreakExpression
- type CallExpression
- type CaseElseExpr
- type CaseExpr
- type CaseMatchExpr
- type ClassIndexerExpression
- type ClassLiteral
- type ClassStatement
- func (c *ClassStatement) Docs() string
- func (c *ClassStatement) End() token.Position
- func (c *ClassStatement) Pos() token.Position
- func (c *ClassStatement) SrcEnd() token.Position
- func (c *ClassStatement) SrcStart() token.Position
- func (c *ClassStatement) String() string
- func (c *ClassStatement) TokenLiteral() string
- type CmdExpression
- type Comment
- type CommentGroup
- type ConstStatement
- func (cs *ConstStatement) Docs() string
- func (cs *ConstStatement) End() token.Position
- func (cs *ConstStatement) Pos() token.Position
- func (cs *ConstStatement) SrcEnd() token.Position
- func (cs *ConstStatement) SrcStart() token.Position
- func (cs *ConstStatement) String() string
- func (cs *ConstStatement) TokenLiteral() string
- type ContinueExpression
- type DateTimeExpr
- type DeferStmt
- type DiamondExpr
- type DoLoop
- type EnumLiteral
- type EnumStatement
- func (e *EnumStatement) Docs() string
- func (e *EnumStatement) End() token.Position
- func (e *EnumStatement) Pos() token.Position
- func (e *EnumStatement) SrcEnd() token.Position
- func (e *EnumStatement) SrcStart() token.Position
- func (e *EnumStatement) String() string
- func (e *EnumStatement) TokenLiteral() string
- type Expression
- type ExpressionStatement
- type FloatLiteral
- type ForEachArrayLoop
- type ForEachDotRange
- type ForEachMapLoop
- type ForEverLoop
- type ForLoop
- type FromExpr
- type FunctionLiteral
- type FunctionStatement
- func (f *FunctionStatement) Docs() string
- func (f *FunctionStatement) End() token.Position
- func (f *FunctionStatement) Pos() token.Position
- func (f *FunctionStatement) SrcEnd() token.Position
- func (f *FunctionStatement) SrcStart() token.Position
- func (f *FunctionStatement) String() string
- func (f *FunctionStatement) TokenLiteral() string
- type GetterStmt
- type GrepExpr
- type GroupExpr
- type HashComprehension
- type HashLiteral
- type HashMapComprehension
- type HashRangeComprehension
- type Identifier
- type IfConditionExpr
- type IfExpression
- type IfMacroStatement
- type ImportStatement
- type IndexExpression
- type InfixExpression
- type IntegerLiteral
- type InterpolatedString
- type JoinExpr
- type LetStatement
- func (ls *LetStatement) Docs() string
- func (ls *LetStatement) End() token.Position
- func (ls *LetStatement) Pos() token.Position
- func (ls *LetStatement) SrcEnd() token.Position
- func (ls *LetStatement) SrcStart() token.Position
- func (ls *LetStatement) String() string
- func (ls *LetStatement) TokenLiteral() string
- type ListComprehension
- type ListMapComprehension
- type ListRangeComprehension
- type MapExpr
- type MethodCallExpression
- type ModifierLevel
- type NewExpression
- type NilLiteral
- type Node
- type OrderExpr
- type OrderingExpr
- type Pipe
- type PostfixExpression
- type PrefixExpression
- type Program
- type PropertyDeclStmt
- func (p *PropertyDeclStmt) Docs() string
- func (p *PropertyDeclStmt) End() token.Position
- func (p *PropertyDeclStmt) Pos() token.Position
- func (p *PropertyDeclStmt) SrcEnd() token.Position
- func (p *PropertyDeclStmt) SrcStart() token.Position
- func (p *PropertyDeclStmt) String() string
- func (p *PropertyDeclStmt) TokenLiteral() string
- type QueryBodyClauseExpr
- type QueryBodyExpr
- type QueryContinuationExpr
- type QueryExpr
- type RangeLiteral
- type RegExLiteral
- type ReturnStatement
- type SelectExpr
- type ServiceStatement
- func (s *ServiceStatement) Docs() string
- func (s *ServiceStatement) End() token.Position
- func (s *ServiceStatement) Pos() token.Position
- func (s *ServiceStatement) SrcEnd() token.Position
- func (s *ServiceStatement) SrcStart() token.Position
- func (s *ServiceStatement) String() string
- func (s *ServiceStatement) TokenLiteral() string
- type SetterStmt
- type SliceExpression
- type Source
- type SpawnStmt
- type Statement
- type StringLiteral
- type StructLiteral
- type TernaryExpression
- type ThrowStmt
- type TryStmt
- type TupleLiteral
- type UIntegerLiteral
- type UnlessExpression
- type UsingStmt
- type WhereExpr
- type WhileLoop
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnotationStmt ¶
type AnnotationStmt struct { Token token.Token Name *Identifier Attributes map[string]Expression }
/////////////////////////////////////////////////////////
ANNOTATIONS //
/////////////////////////////////////////////////////////
func (*AnnotationStmt) End ¶
func (anno *AnnotationStmt) End() token.Position
func (*AnnotationStmt) Pos ¶
func (anno *AnnotationStmt) Pos() token.Position
func (*AnnotationStmt) String ¶
func (anno *AnnotationStmt) String() string
func (*AnnotationStmt) TokenLiteral ¶
func (anno *AnnotationStmt) TokenLiteral() string
type ArrayLiteral ¶
type ArrayLiteral struct { Token token.Token Members []Expression CreationCount *IntegerLiteral }
/////////////////////////////////////////////////////////
ARRAY LITERAL //
/////////////////////////////////////////////////////////
func (*ArrayLiteral) End ¶
func (a *ArrayLiteral) End() token.Position
func (*ArrayLiteral) Pos ¶
func (a *ArrayLiteral) Pos() token.Position
func (*ArrayLiteral) String ¶
func (a *ArrayLiteral) String() string
func (*ArrayLiteral) TokenLiteral ¶
func (a *ArrayLiteral) TokenLiteral() string
type AssignExpression ¶
type AssignExpression struct { Token token.Token Name Expression Value Expression }
/////////////////////////////////////////////////////////
ASSIGN //
/////////////////////////////////////////////////////////
func (*AssignExpression) End ¶
func (ae *AssignExpression) End() token.Position
func (*AssignExpression) Pos ¶
func (ae *AssignExpression) Pos() token.Position
func (*AssignExpression) String ¶
func (ae *AssignExpression) String() string
func (*AssignExpression) TokenLiteral ¶
func (ae *AssignExpression) TokenLiteral() string
type AwaitExpr ¶
type AwaitExpr struct { Token token.Token Call Expression }
result = await add(1, 2) await hello()
func (*AwaitExpr) TokenLiteral ¶
type BlockStatement ¶
func (*BlockStatement) End ¶
func (bs *BlockStatement) End() token.Position
func (*BlockStatement) Pos ¶
func (bs *BlockStatement) Pos() token.Position
func (*BlockStatement) String ¶
func (bs *BlockStatement) String() string
func (*BlockStatement) TokenLiteral ¶
func (bs *BlockStatement) TokenLiteral() string
type Boolean ¶
/////////////////////////////////////////////////////////
BOOLEAN LITERAL //
/////////////////////////////////////////////////////////
func (*Boolean) TokenLiteral ¶
type BreakExpression ¶
/////////////////////////////////////////////////////////
BREAK //
/////////////////////////////////////////////////////////
func (*BreakExpression) End ¶
func (be *BreakExpression) End() token.Position
func (*BreakExpression) Pos ¶
func (be *BreakExpression) Pos() token.Position
func (*BreakExpression) String ¶
func (be *BreakExpression) String() string
func (*BreakExpression) TokenLiteral ¶
func (be *BreakExpression) TokenLiteral() string
type CallExpression ¶
type CallExpression struct { Token token.Token Function Expression Arguments []Expression Awaited bool // if it is an awaited call }
/////////////////////////////////////////////////////////
CALL //
/////////////////////////////////////////////////////////
func (*CallExpression) End ¶
func (ce *CallExpression) End() token.Position
func (*CallExpression) Pos ¶
func (ce *CallExpression) Pos() token.Position
func (*CallExpression) String ¶
func (ce *CallExpression) String() string
func (*CallExpression) TokenLiteral ¶
func (ce *CallExpression) TokenLiteral() string
type CaseElseExpr ¶
type CaseElseExpr struct { Token token.Token Block *BlockStatement }
func (*CaseElseExpr) End ¶
func (ce *CaseElseExpr) End() token.Position
func (*CaseElseExpr) Pos ¶
func (ce *CaseElseExpr) Pos() token.Position
func (*CaseElseExpr) String ¶
func (ce *CaseElseExpr) String() string
func (*CaseElseExpr) TokenLiteral ¶
func (ce *CaseElseExpr) TokenLiteral() string
type CaseExpr ¶
type CaseExpr struct { Token token.Token IsWholeMatch bool Expr Expression Matches []Expression }
/////////////////////////////////////////////////////////
CASE/ESLE //
/////////////////////////////////////////////////////////
func (*CaseExpr) TokenLiteral ¶
type CaseMatchExpr ¶
type CaseMatchExpr struct { Token token.Token Expr Expression Block *BlockStatement }
func (*CaseMatchExpr) End ¶
func (cm *CaseMatchExpr) End() token.Position
func (*CaseMatchExpr) Pos ¶
func (cm *CaseMatchExpr) Pos() token.Position
func (*CaseMatchExpr) String ¶
func (cm *CaseMatchExpr) String() string
func (*CaseMatchExpr) TokenLiteral ¶
func (cm *CaseMatchExpr) TokenLiteral() string
type ClassIndexerExpression ¶
type ClassIndexerExpression struct { Token token.Token Parameters []Expression //indexer's parameters }
/////////////////////////////////////////////////////////
CLASS/INDEXER //
/////////////////////////////////////////////////////////
func (*ClassIndexerExpression) End ¶
func (ci *ClassIndexerExpression) End() token.Position
func (*ClassIndexerExpression) Pos ¶
func (ci *ClassIndexerExpression) Pos() token.Position
func (*ClassIndexerExpression) String ¶
func (ci *ClassIndexerExpression) String() string
func (*ClassIndexerExpression) TokenLiteral ¶
func (ci *ClassIndexerExpression) TokenLiteral() string
type ClassLiteral ¶
type ClassLiteral struct { Token token.Token Name string Parent string Members []*LetStatement //class's fields Properties map[string]*PropertyDeclStmt //class's properties Methods map[string]*FunctionStatement //class's methods Block *BlockStatement //mainly used for debugging purpose Modifier ModifierLevel //NOT IMPLEMENTED }
/////////////////////////////////////////////////////////
CLASS LITERAL //
///////////////////////////////////////////////////////// class : parentClass { block }
func (*ClassLiteral) End ¶
func (c *ClassLiteral) End() token.Position
func (*ClassLiteral) Pos ¶
func (c *ClassLiteral) Pos() token.Position
func (*ClassLiteral) String ¶
func (c *ClassLiteral) String() string
func (*ClassLiteral) TokenLiteral ¶
func (c *ClassLiteral) TokenLiteral() string
type ClassStatement ¶
type ClassStatement struct { Token token.Token Name *Identifier //Class name CategoryName *Identifier ClassLiteral *ClassLiteral IsAnnotation bool //class is a annotation class //Doc related Doc *CommentGroup // associated documentation; or nil SrcEndToken token.Token }
class classname : parentClass { block } class @classname: parentClass { block } //Annotation /////////////////////////////////////////////////////////
CLASS STATEMENT //
/////////////////////////////////////////////////////////
func (*ClassStatement) Docs ¶
func (c *ClassStatement) Docs() string
func (*ClassStatement) End ¶
func (c *ClassStatement) End() token.Position
func (*ClassStatement) Pos ¶
func (c *ClassStatement) Pos() token.Position
func (*ClassStatement) SrcEnd ¶
func (c *ClassStatement) SrcEnd() token.Position
func (*ClassStatement) SrcStart ¶
func (c *ClassStatement) SrcStart() token.Position
Below two methods implements 'Source' interface.
func (*ClassStatement) String ¶
func (c *ClassStatement) String() string
func (*ClassStatement) TokenLiteral ¶
func (c *ClassStatement) TokenLiteral() string
type CmdExpression ¶
/////////////////////////////////////////////////////////
COMMAND //
/////////////////////////////////////////////////////////
func (*CmdExpression) End ¶
func (c *CmdExpression) End() token.Position
func (*CmdExpression) Pos ¶
func (c *CmdExpression) Pos() token.Position
func (*CmdExpression) String ¶
func (c *CmdExpression) String() string
func (*CmdExpression) TokenLiteral ¶
func (c *CmdExpression) TokenLiteral() string
type CommentGroup ¶
type CommentGroup struct {
List []*Comment // len(List) > 0
}
A CommentGroup represents a sequence of comments with no other tokens and no empty lines between.
func (*CommentGroup) End ¶
func (g *CommentGroup) End() token.Position
func (*CommentGroup) Pos ¶
func (g *CommentGroup) Pos() token.Position
func (*CommentGroup) Text ¶
func (g *CommentGroup) Text() string
Text returns the text of the comment. Comment markers (//, /*, and */), the first space of a line comment, and leading and trailing empty lines are removed. Multiple empty lines are reduced to one, and trailing space on lines is trimmed. Unless the result is empty, it is newline-terminated.
type ConstStatement ¶
type ConstStatement struct { Token token.Token Name []*Identifier Value []Expression StaticFlag bool ModifierLevel ModifierLevel //used in 'class' Annotations []*AnnotationStmt //Doc related Doc *CommentGroup // associated documentation; or nil SrcEndToken token.Token }
/////////////////////////////////////////////////////////
CONST STATEMENT //
/////////////////////////////////////////////////////////
func (*ConstStatement) Docs ¶
func (cs *ConstStatement) Docs() string
func (*ConstStatement) End ¶
func (cs *ConstStatement) End() token.Position
func (*ConstStatement) Pos ¶
func (cs *ConstStatement) Pos() token.Position
func (*ConstStatement) SrcEnd ¶
func (cs *ConstStatement) SrcEnd() token.Position
func (*ConstStatement) SrcStart ¶
func (cs *ConstStatement) SrcStart() token.Position
Below two methods implements 'Source' interface.
func (*ConstStatement) String ¶
func (cs *ConstStatement) String() string
func (*ConstStatement) TokenLiteral ¶
func (cs *ConstStatement) TokenLiteral() string
type ContinueExpression ¶
/////////////////////////////////////////////////////////
CONTINUE //
/////////////////////////////////////////////////////////
func (*ContinueExpression) End ¶
func (ce *ContinueExpression) End() token.Position
func (*ContinueExpression) Pos ¶
func (ce *ContinueExpression) Pos() token.Position
func (*ContinueExpression) String ¶
func (ce *ContinueExpression) String() string
func (*ContinueExpression) TokenLiteral ¶
func (ce *ContinueExpression) TokenLiteral() string
type DateTimeExpr ¶
type DateTimeExpr struct { Token token.Token Pattern *InterpolatedString // pattern string }
/////////////////////////////////////////////////////////
DateTime Expression //
/////////////////////////////////////////////////////////
func (*DateTimeExpr) End ¶
func (dt *DateTimeExpr) End() token.Position
func (*DateTimeExpr) Pos ¶
func (dt *DateTimeExpr) Pos() token.Position
func (*DateTimeExpr) String ¶
func (dt *DateTimeExpr) String() string
func (*DateTimeExpr) TokenLiteral ¶
func (dt *DateTimeExpr) TokenLiteral() string
type DeferStmt ¶
type DeferStmt struct { Token token.Token Call Expression }
/////////////////////////////////////////////////////////
DEFER STATEMENT //
/////////////////////////////////////////////////////////
func (*DeferStmt) TokenLiteral ¶
type DiamondExpr ¶
/////////////////////////////////////////////////////////
Diamond //
/////////////////////////////////////////////////////////
func (*DiamondExpr) End ¶
func (d *DiamondExpr) End() token.Position
func (*DiamondExpr) Pos ¶
func (d *DiamondExpr) Pos() token.Position
func (*DiamondExpr) String ¶
func (d *DiamondExpr) String() string
func (*DiamondExpr) TokenLiteral ¶
func (d *DiamondExpr) TokenLiteral() string
type DoLoop ¶
type DoLoop struct { Token token.Token Block *BlockStatement }
/////////////////////////////////////////////////////////
DO LOOP //
/////////////////////////////////////////////////////////
func (*DoLoop) TokenLiteral ¶
type EnumLiteral ¶
type EnumLiteral struct { Token token.Token Pairs map[Expression]Expression RBraceToken token.Token }
/////////////////////////////////////////////////////////
ENUM Literal //
/////////////////////////////////////////////////////////
func (*EnumLiteral) End ¶
func (e *EnumLiteral) End() token.Position
func (*EnumLiteral) Pos ¶
func (e *EnumLiteral) Pos() token.Position
func (*EnumLiteral) String ¶
func (e *EnumLiteral) String() string
func (*EnumLiteral) Text ¶
func (e *EnumLiteral) Text(name string) string
func (*EnumLiteral) TokenLiteral ¶
func (e *EnumLiteral) TokenLiteral() string
type EnumStatement ¶
type EnumStatement struct { Token token.Token Name *Identifier EnumLiteral *EnumLiteral //Doc related Doc *CommentGroup // associated documentation; or nil SrcEndToken token.Token }
/////////////////////////////////////////////////////////
ENUM STATEMENT //
/////////////////////////////////////////////////////////
func (*EnumStatement) Docs ¶
func (e *EnumStatement) Docs() string
func (*EnumStatement) End ¶
func (e *EnumStatement) End() token.Position
func (*EnumStatement) Pos ¶
func (e *EnumStatement) Pos() token.Position
func (*EnumStatement) SrcEnd ¶
func (e *EnumStatement) SrcEnd() token.Position
func (*EnumStatement) SrcStart ¶
func (e *EnumStatement) SrcStart() token.Position
Below two methods implements 'Source' interface.
func (*EnumStatement) String ¶
func (e *EnumStatement) String() string
func (*EnumStatement) TokenLiteral ¶
func (e *EnumStatement) TokenLiteral() string
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
type ExpressionStatement ¶
type ExpressionStatement struct { Token token.Token Expression Expression }
/////////////////////////////////////////////////////////
EXPRESSION STATEMENT //
/////////////////////////////////////////////////////////
func (*ExpressionStatement) End ¶
func (es *ExpressionStatement) End() token.Position
func (*ExpressionStatement) Pos ¶
func (es *ExpressionStatement) Pos() token.Position
func (*ExpressionStatement) String ¶
func (es *ExpressionStatement) String() string
func (*ExpressionStatement) TokenLiteral ¶
func (es *ExpressionStatement) TokenLiteral() string
type FloatLiteral ¶
/////////////////////////////////////////////////////////
FLOAT LITERAL //
/////////////////////////////////////////////////////////
func (*FloatLiteral) End ¶
func (fl *FloatLiteral) End() token.Position
func (*FloatLiteral) Pos ¶
func (fl *FloatLiteral) Pos() token.Position
func (*FloatLiteral) String ¶
func (fl *FloatLiteral) String() string
func (*FloatLiteral) TokenLiteral ¶
func (fl *FloatLiteral) TokenLiteral() string
type ForEachArrayLoop ¶
type ForEachArrayLoop struct { Token token.Token Var string Value Expression //value to range over Cond Expression //conditional clause(nil if there is no 'WHERE' clause) Block Node //BlockStatement or single expression }
func (*ForEachArrayLoop) End ¶
func (fal *ForEachArrayLoop) End() token.Position
func (*ForEachArrayLoop) Pos ¶
func (fal *ForEachArrayLoop) Pos() token.Position
func (*ForEachArrayLoop) String ¶
func (fal *ForEachArrayLoop) String() string
func (*ForEachArrayLoop) TokenLiteral ¶
func (fal *ForEachArrayLoop) TokenLiteral() string
type ForEachDotRange ¶
type ForEachDotRange struct { Token token.Token Var string StartIdx Expression EndIdx Expression Cond Expression //conditional clause(nil if there is no 'WHERE' clause) Block Node //BlockStatement or single expression }
for i in start..end <where cond> { }
func (*ForEachDotRange) End ¶
func (fdr *ForEachDotRange) End() token.Position
func (*ForEachDotRange) Pos ¶
func (fdr *ForEachDotRange) Pos() token.Position
func (*ForEachDotRange) String ¶
func (fdr *ForEachDotRange) String() string
func (*ForEachDotRange) TokenLiteral ¶
func (fdr *ForEachDotRange) TokenLiteral() string
type ForEachMapLoop ¶
type ForEachMapLoop struct { Token token.Token Key string Value string X Expression //value to range over Cond Expression //Conditional clause(nil if there is no 'WHERE' clause) Block Node //BlockStatement or single expression }
func (*ForEachMapLoop) End ¶
func (fml *ForEachMapLoop) End() token.Position
func (*ForEachMapLoop) Pos ¶
func (fml *ForEachMapLoop) Pos() token.Position
func (*ForEachMapLoop) String ¶
func (fml *ForEachMapLoop) String() string
func (*ForEachMapLoop) TokenLiteral ¶
func (fml *ForEachMapLoop) TokenLiteral() string
type ForEverLoop ¶
type ForEverLoop struct { Token token.Token Block *BlockStatement }
func (*ForEverLoop) End ¶
func (fel *ForEverLoop) End() token.Position
func (*ForEverLoop) Pos ¶
func (fel *ForEverLoop) Pos() token.Position
func (*ForEverLoop) String ¶
func (fel *ForEverLoop) String() string
func (*ForEverLoop) TokenLiteral ¶
func (fel *ForEverLoop) TokenLiteral() string
type ForLoop ¶
type ForLoop struct { Token token.Token Init Expression Cond Expression Update Expression Block Node //BlockStatement or single expression }
/////////////////////////////////////////////////////////
FOR LOOP //
/////////////////////////////////////////////////////////
func (*ForLoop) TokenLiteral ¶
type FromExpr ¶
type FromExpr struct { Token token.Token //from Var string //identifier Expr Expression }
from_clause : FROM identifier IN expression
func (*FromExpr) TokenLiteral ¶
type FunctionLiteral ¶
type FunctionLiteral struct { Token token.Token Parameters []Expression Body *BlockStatement //Default values Values map[string]Expression Variadic bool StaticFlag bool ModifierLevel ModifierLevel //for 'class' use //If the function is async or not Async bool }
/////////////////////////////////////////////////////////
FUNCTION LITERAL //
/////////////////////////////////////////////////////////
func (*FunctionLiteral) End ¶
func (fl *FunctionLiteral) End() token.Position
func (*FunctionLiteral) Pos ¶
func (fl *FunctionLiteral) Pos() token.Position
func (*FunctionLiteral) StmtPos ¶
func (fl *FunctionLiteral) StmtPos() token.Position
For debugger use
func (*FunctionLiteral) String ¶
func (fl *FunctionLiteral) String() string
func (*FunctionLiteral) TokenLiteral ¶
func (fl *FunctionLiteral) TokenLiteral() string
type FunctionStatement ¶
type FunctionStatement struct { Token token.Token Name *Identifier FunctionLiteral *FunctionLiteral Annotations []*AnnotationStmt IsServiceAnno bool //service annotation(@route) is processed differently //Doc related Doc *CommentGroup // associated documentation; or nil SrcEndToken token.Token //used for printing source code }
/////////////////////////////////////////////////////////
FUNCTION STATEMENT //
/////////////////////////////////////////////////////////
func (*FunctionStatement) Docs ¶
func (f *FunctionStatement) Docs() string
func (*FunctionStatement) End ¶
func (f *FunctionStatement) End() token.Position
func (*FunctionStatement) Pos ¶
func (f *FunctionStatement) Pos() token.Position
func (*FunctionStatement) SrcEnd ¶
func (f *FunctionStatement) SrcEnd() token.Position
func (*FunctionStatement) SrcStart ¶
func (f *FunctionStatement) SrcStart() token.Position
Below two methods implements 'Source' interface.
func (*FunctionStatement) String ¶
func (f *FunctionStatement) String() string
func (*FunctionStatement) TokenLiteral ¶
func (f *FunctionStatement) TokenLiteral() string
type GetterStmt ¶
type GetterStmt struct { Token token.Token Body *BlockStatement }
property's getter statement
func (*GetterStmt) End ¶
func (g *GetterStmt) End() token.Position
func (*GetterStmt) Pos ¶
func (g *GetterStmt) Pos() token.Position
func (*GetterStmt) String ¶
func (g *GetterStmt) String() string
func (*GetterStmt) TokenLiteral ¶
func (g *GetterStmt) TokenLiteral() string
type GrepExpr ¶
type GrepExpr struct { Token token.Token Var string //Name is "$_" Value Expression //value to range over Block *BlockStatement //Grep Block, may be nil Expr Expression //Grep Expr, may be nil }
/////////////////////////////////////////////////////////
GREP //
/////////////////////////////////////////////////////////
func (*GrepExpr) TokenLiteral ¶
type GroupExpr ¶
type GroupExpr struct { Token token.Token //'group' GrpExpr Expression ByExpr Expression }
GROUP expression BY expression
func (*GroupExpr) TokenLiteral ¶
type HashComprehension ¶
type HashComprehension struct { Token token.Token Var string Value Expression //value(array or string) to range over Cond Expression //conditional clause(nil if there is no 'WHERE' clause) KeyExpr Expression //the result Key expression ValExpr Expression //the result Value expression }
/////////////////////////////////////////////////////////
Hash Comprehension(for array & string) //
///////////////////////////////////////////////////////// { KeyExpr:ValExpr for Var in Value <where Cond> } -->Value could be array or string
func (*HashComprehension) End ¶
func (hc *HashComprehension) End() token.Position
func (*HashComprehension) Pos ¶
func (hc *HashComprehension) Pos() token.Position
func (*HashComprehension) String ¶
func (hc *HashComprehension) String() string
func (*HashComprehension) TokenLiteral ¶
func (hc *HashComprehension) TokenLiteral() string
type HashLiteral ¶
type HashLiteral struct { Token token.Token Order []Expression //For keeping the order of the hash key Pairs map[Expression]Expression RBraceToken token.Token }
/////////////////////////////////////////////////////////
HASH LITERAL //
/////////////////////////////////////////////////////////
func (*HashLiteral) End ¶
func (h *HashLiteral) End() token.Position
func (*HashLiteral) Pos ¶
func (h *HashLiteral) Pos() token.Position
func (*HashLiteral) String ¶
func (h *HashLiteral) String() string
func (*HashLiteral) TokenLiteral ¶
func (h *HashLiteral) TokenLiteral() string
type HashMapComprehension ¶
type HashMapComprehension struct { Token token.Token Key string Value string X Expression //value(hash) to range over Cond Expression //Conditional clause(nil if there is no 'WHERE' clause) KeyExpr Expression //the result Key expression ValExpr Expression //the result Value expression }
/////////////////////////////////////////////////////////
Hash Map Comprehension //
///////////////////////////////////////////////////////// { KeyExpr:ValExpr for Key,Value in X <where Cond> }
func (*HashMapComprehension) End ¶
func (mc *HashMapComprehension) End() token.Position
func (*HashMapComprehension) Pos ¶
func (mc *HashMapComprehension) Pos() token.Position
func (*HashMapComprehension) String ¶
func (mc *HashMapComprehension) String() string
func (*HashMapComprehension) TokenLiteral ¶
func (mc *HashMapComprehension) TokenLiteral() string
type HashRangeComprehension ¶
type HashRangeComprehension struct { Token token.Token Var string StartIdx Expression EndIdx Expression Cond Expression //conditional clause(nil if there is no 'WHERE' clause) KeyExpr Expression //the result Key expression ValExpr Expression //the result Value expression }
/////////////////////////////////////////////////////////
Hash Comprehension(for range) //
///////////////////////////////////////////////////////// { KeyExp:ValExp for Var in StartIdx..EndIdx <where Cond> }
func (*HashRangeComprehension) End ¶
func (hc *HashRangeComprehension) End() token.Position
func (*HashRangeComprehension) Pos ¶
func (hc *HashRangeComprehension) Pos() token.Position
func (*HashRangeComprehension) String ¶
func (hc *HashRangeComprehension) String() string
func (*HashRangeComprehension) TokenLiteral ¶
func (hc *HashRangeComprehension) TokenLiteral() string
type Identifier ¶
/////////////////////////////////////////////////////////
IDENTIFIER //
/////////////////////////////////////////////////////////
func (*Identifier) End ¶
func (i *Identifier) End() token.Position
func (*Identifier) Pos ¶
func (i *Identifier) Pos() token.Position
func (*Identifier) String ¶
func (i *Identifier) String() string
func (*Identifier) TokenLiteral ¶
func (i *Identifier) TokenLiteral() string
type IfConditionExpr ¶
type IfConditionExpr struct { Token token.Token Cond Expression //condition Body Node //body(BlockStatement or single ExpressionStatement) }
if/else-if condition
func (*IfConditionExpr) End ¶
func (ic *IfConditionExpr) End() token.Position
func (*IfConditionExpr) Pos ¶
func (ic *IfConditionExpr) Pos() token.Position
func (*IfConditionExpr) String ¶
func (ic *IfConditionExpr) String() string
func (*IfConditionExpr) TokenLiteral ¶
func (ic *IfConditionExpr) TokenLiteral() string
type IfExpression ¶
type IfExpression struct { Token token.Token Conditions []*IfConditionExpr //if or elif part Alternative Node //else part(BlockStatement or single ExpressionStatement) }
func (*IfExpression) End ¶
func (ifex *IfExpression) End() token.Position
func (*IfExpression) Pos ¶
func (ifex *IfExpression) Pos() token.Position
func (*IfExpression) String ¶
func (ifex *IfExpression) String() string
func (*IfExpression) TokenLiteral ¶
func (ifex *IfExpression) TokenLiteral() string
type IfMacroStatement ¶
type IfMacroStatement struct { Token token.Token Condition bool ConditionStr string Consequence *BlockStatement Alternative *BlockStatement }
/////////////////////////////////////////////////////////
IFELSE MACRO STATEMENT //
/////////////////////////////////////////////////////////
func (*IfMacroStatement) End ¶
func (ifex *IfMacroStatement) End() token.Position
func (*IfMacroStatement) Pos ¶
func (ifex *IfMacroStatement) Pos() token.Position
func (*IfMacroStatement) String ¶
func (ifex *IfMacroStatement) String() string
func (*IfMacroStatement) TokenLiteral ¶
func (ifex *IfMacroStatement) TokenLiteral() string
type ImportStatement ¶
type ImportStatement struct { Token token.Token ImportPath string Program *Program Functions map[string]*FunctionLiteral //for debugger usage }
/////////////////////////////////////////////////////////
IMPORT STATEMENT //
/////////////////////////////////////////////////////////
func (*ImportStatement) End ¶
func (is *ImportStatement) End() token.Position
func (*ImportStatement) Pos ¶
func (is *ImportStatement) Pos() token.Position
func (*ImportStatement) String ¶
func (is *ImportStatement) String() string
func (*ImportStatement) TokenLiteral ¶
func (is *ImportStatement) TokenLiteral() string
type IndexExpression ¶
type IndexExpression struct { Token token.Token Left Expression Index Expression }
func (*IndexExpression) End ¶
func (ie *IndexExpression) End() token.Position
func (*IndexExpression) Pos ¶
func (ie *IndexExpression) Pos() token.Position
func (*IndexExpression) String ¶
func (ie *IndexExpression) String() string
func (*IndexExpression) TokenLiteral ¶
func (ie *IndexExpression) TokenLiteral() string
type InfixExpression ¶
type InfixExpression struct { Token token.Token Operator string Right Expression Left Expression }
/////////////////////////////////////////////////////////
INFIX //
/////////////////////////////////////////////////////////
func (*InfixExpression) End ¶
func (ie *InfixExpression) End() token.Position
func (*InfixExpression) Pos ¶
func (ie *InfixExpression) Pos() token.Position
func (*InfixExpression) String ¶
func (ie *InfixExpression) String() string
func (*InfixExpression) TokenLiteral ¶
func (ie *InfixExpression) TokenLiteral() string
type IntegerLiteral ¶
/////////////////////////////////////////////////////////
INTEGER LITERAL //
/////////////////////////////////////////////////////////
func (*IntegerLiteral) End ¶
func (il *IntegerLiteral) End() token.Position
func (*IntegerLiteral) Pos ¶
func (il *IntegerLiteral) Pos() token.Position
func (*IntegerLiteral) String ¶
func (il *IntegerLiteral) String() string
func (*IntegerLiteral) TokenLiteral ¶
func (il *IntegerLiteral) TokenLiteral() string
type InterpolatedString ¶
type InterpolatedString struct { Token token.Token Value string ExprMap map[byte]Expression }
/////////////////////////////////////////////////////////
INTERPOLATED STRING //
/////////////////////////////////////////////////////////
func (*InterpolatedString) End ¶
func (is *InterpolatedString) End() token.Position
func (*InterpolatedString) Pos ¶
func (is *InterpolatedString) Pos() token.Position
func (*InterpolatedString) String ¶
func (is *InterpolatedString) String() string
func (*InterpolatedString) TokenLiteral ¶
func (is *InterpolatedString) TokenLiteral() string
type JoinExpr ¶
type JoinExpr struct { Token token.Token //'join' JoinVar string //identifier InExpr Expression OnExpr Expression EqualExpr Expression IntoVar *Identifier //why IntoVar's type is '*Identifier', not 'string'? because we need it in 'End()' function. }
combined_join_clause : JOIN identifier IN expression ON expression EQUALS expression (INTO identifier)?
func (*JoinExpr) TokenLiteral ¶
type LetStatement ¶
type LetStatement struct { Token token.Token Names []*Identifier Values []Expression StaticFlag bool ModifierLevel ModifierLevel //used in 'class' Annotations []*AnnotationStmt //Doc related Doc *CommentGroup // associated documentation; or nil SrcEndToken token.Token //destructuring assigment flag DestructingFlag bool //For debugger use, If the LetStatement is in a class declaration, //we do not want the debugger to stop at it. InClass bool //true if the LetStatement is in a Class declaration }
/////////////////////////////////////////////////////////
LET STATEMENT //
/////////////////////////////////////////////////////////
func (*LetStatement) Docs ¶
func (ls *LetStatement) Docs() string
func (*LetStatement) End ¶
func (ls *LetStatement) End() token.Position
func (*LetStatement) Pos ¶
func (ls *LetStatement) Pos() token.Position
func (*LetStatement) SrcEnd ¶
func (ls *LetStatement) SrcEnd() token.Position
func (*LetStatement) SrcStart ¶
func (ls *LetStatement) SrcStart() token.Position
Below two methods implements 'Source' interface.
func (*LetStatement) String ¶
func (ls *LetStatement) String() string
func (*LetStatement) TokenLiteral ¶
func (ls *LetStatement) TokenLiteral() string
type ListComprehension ¶
type ListComprehension struct { Token token.Token Var string Value Expression //value(array or string) to range over Cond Expression //conditional clause(nil if there is no 'WHERE' clause) Expr Expression //the result expression }
/////////////////////////////////////////////////////////
List Comprehension(for array & string) //
///////////////////////////////////////////////////////// [ Expr for Var in Value <where Cond> ] ---> Value could be array or string
func (*ListComprehension) End ¶
func (lc *ListComprehension) End() token.Position
func (*ListComprehension) Pos ¶
func (lc *ListComprehension) Pos() token.Position
func (*ListComprehension) String ¶
func (lc *ListComprehension) String() string
func (*ListComprehension) TokenLiteral ¶
func (lc *ListComprehension) TokenLiteral() string
type ListMapComprehension ¶
type ListMapComprehension struct { Token token.Token Key string Value string X Expression //value(hash) to range over Cond Expression //Conditional clause(nil if there is no 'WHERE' clause) Expr Expression //the result expression }
/////////////////////////////////////////////////////////
LIST Map Comprehension //
///////////////////////////////////////////////////////// [ Expr for Key,Value in X <where Cond>]
func (*ListMapComprehension) End ¶
func (mc *ListMapComprehension) End() token.Position
func (*ListMapComprehension) Pos ¶
func (mc *ListMapComprehension) Pos() token.Position
func (*ListMapComprehension) String ¶
func (mc *ListMapComprehension) String() string
func (*ListMapComprehension) TokenLiteral ¶
func (mc *ListMapComprehension) TokenLiteral() string
type ListRangeComprehension ¶
type ListRangeComprehension struct { Token token.Token Var string StartIdx Expression EndIdx Expression Cond Expression //conditional clause(nil if there is no 'WHERE' clause) Expr Expression //the result expression }
/////////////////////////////////////////////////////////
List Comprehension(for range) //
///////////////////////////////////////////////////////// [Expr for Var in StartIdx..EndIdx <where Cond>]
func (*ListRangeComprehension) End ¶
func (lc *ListRangeComprehension) End() token.Position
func (*ListRangeComprehension) Pos ¶
func (lc *ListRangeComprehension) Pos() token.Position
func (*ListRangeComprehension) String ¶
func (lc *ListRangeComprehension) String() string
func (*ListRangeComprehension) TokenLiteral ¶
func (lc *ListRangeComprehension) TokenLiteral() string
type MapExpr ¶
type MapExpr struct { Token token.Token Var string //Name is "$_" Value Expression //value to range over Block *BlockStatement //Grep Block, may be nil Expr Expression //Grep Expr, may be nil }
/////////////////////////////////////////////////////////
MAP //
/////////////////////////////////////////////////////////
func (*MapExpr) TokenLiteral ¶
type MethodCallExpression ¶
type MethodCallExpression struct { Token token.Token Object Expression Call Expression }
/////////////////////////////////////////////////////////
METHOD CALL //
/////////////////////////////////////////////////////////
func (*MethodCallExpression) End ¶
func (mc *MethodCallExpression) End() token.Position
func (*MethodCallExpression) Pos ¶
func (mc *MethodCallExpression) Pos() token.Position
func (*MethodCallExpression) String ¶
func (mc *MethodCallExpression) String() string
func (*MethodCallExpression) TokenLiteral ¶
func (mc *MethodCallExpression) TokenLiteral() string
type ModifierLevel ¶
type ModifierLevel int
class's method modifier
const ( ModifierDefault ModifierLevel = iota ModifierPrivate ModifierProtected ModifierPublic )
type NewExpression ¶
type NewExpression struct { Token token.Token Class Expression Arguments []Expression }
func (*NewExpression) End ¶
func (c *NewExpression) End() token.Position
func (*NewExpression) Pos ¶
func (c *NewExpression) Pos() token.Position
func (*NewExpression) String ¶
func (n *NewExpression) String() string
func (*NewExpression) TokenLiteral ¶
func (n *NewExpression) TokenLiteral() string
type NilLiteral ¶
/////////////////////////////////////////////////////////
NIL LITERAL //
/////////////////////////////////////////////////////////
func (*NilLiteral) End ¶
func (n *NilLiteral) End() token.Position
func (*NilLiteral) Pos ¶
func (n *NilLiteral) Pos() token.Position
func (*NilLiteral) String ¶
func (n *NilLiteral) String() string
func (*NilLiteral) TokenLiteral ¶
func (n *NilLiteral) TokenLiteral() string
type OrderExpr ¶
type OrderExpr struct { Token token.Token //'orderby' Ordering []Expression //[]*OrderingExpr }
orderby_clause : ORDERBY ordering (',' ordering)*
func (*OrderExpr) TokenLiteral ¶
type OrderingExpr ¶
type OrderingExpr struct { Expr Expression IsAscending bool // if there is no 'ASCENDING or 'DESCENDING', it's default to 'ASCENDING' HasSortOrder bool OrderToken token.Token //'ascending' or 'descending' Var string }
ordering : expression (ASCENDING | DESCENDING)?
func (*OrderingExpr) End ¶
func (o *OrderingExpr) End() token.Position
func (*OrderingExpr) Pos ¶
func (o *OrderingExpr) Pos() token.Position
func (*OrderingExpr) String ¶
func (o *OrderingExpr) String() string
func (*OrderingExpr) TokenLiteral ¶
func (o *OrderingExpr) TokenLiteral() string
type Pipe ¶
type Pipe struct { Token token.Token Left Expression Right Expression }
/////////////////////////////////////////////////////////
PIPE OPERATOR //
///////////////////////////////////////////////////////// Pipe operator.
func (*Pipe) TokenLiteral ¶
type PostfixExpression ¶
type PostfixExpression struct { Token token.Token Left Expression Operator string }
/////////////////////////////////////////////////////////
POSTFIX //
/////////////////////////////////////////////////////////
func (*PostfixExpression) End ¶
func (pe *PostfixExpression) End() token.Position
func (*PostfixExpression) Pos ¶
func (pe *PostfixExpression) Pos() token.Position
func (*PostfixExpression) String ¶
func (pe *PostfixExpression) String() string
func (*PostfixExpression) TokenLiteral ¶
func (pe *PostfixExpression) TokenLiteral() string
type PrefixExpression ¶
type PrefixExpression struct { Token token.Token Operator string Right Expression }
/////////////////////////////////////////////////////////
PREFIX //
/////////////////////////////////////////////////////////
func (*PrefixExpression) End ¶
func (pe *PrefixExpression) End() token.Position
func (*PrefixExpression) Pos ¶
func (pe *PrefixExpression) Pos() token.Position
func (*PrefixExpression) String ¶
func (pe *PrefixExpression) String() string
func (*PrefixExpression) TokenLiteral ¶
func (pe *PrefixExpression) TokenLiteral() string
type Program ¶
type Program struct { Statements []Statement Imports map[string]*ImportStatement }
func (*Program) TokenLiteral ¶
type PropertyDeclStmt ¶
type PropertyDeclStmt struct { Token token.Token Name *Identifier //property name Getter *GetterStmt //getter Setter *SetterStmt //setter Indexes []*Identifier //only used in class's indexer StaticFlag bool ModifierLevel ModifierLevel //property's modifier Annotations []*AnnotationStmt Default Expression //Doc related Doc *CommentGroup // associated documentation; or nil SrcEndToken token.Token }
class's property declaration
func (*PropertyDeclStmt) Docs ¶
func (p *PropertyDeclStmt) Docs() string
func (*PropertyDeclStmt) End ¶
func (p *PropertyDeclStmt) End() token.Position
func (*PropertyDeclStmt) Pos ¶
func (p *PropertyDeclStmt) Pos() token.Position
func (*PropertyDeclStmt) SrcEnd ¶
func (p *PropertyDeclStmt) SrcEnd() token.Position
func (*PropertyDeclStmt) SrcStart ¶
func (p *PropertyDeclStmt) SrcStart() token.Position
Below two methods implements 'Source' interface.
func (*PropertyDeclStmt) String ¶
func (p *PropertyDeclStmt) String() string
func (*PropertyDeclStmt) TokenLiteral ¶
func (p *PropertyDeclStmt) TokenLiteral() string
type QueryBodyClauseExpr ¶
type QueryBodyClauseExpr struct {
Expr Expression
}
query_body_clause: from_clause | let_clause | where_clause | combined_join_clause | orderby_clause
func (*QueryBodyClauseExpr) End ¶
func (q *QueryBodyClauseExpr) End() token.Position
func (*QueryBodyClauseExpr) Pos ¶
func (q *QueryBodyClauseExpr) Pos() token.Position
func (*QueryBodyClauseExpr) String ¶
func (q *QueryBodyClauseExpr) String() string
func (*QueryBodyClauseExpr) TokenLiteral ¶
func (q *QueryBodyClauseExpr) TokenLiteral() string
type QueryBodyExpr ¶
type QueryBodyExpr struct { QueryBody []Expression //QueryBodyClauseExpr Expr Expression //SelectExpr or GroupExpr QueryContinuation Expression //QueryContinuationExpr }
query_body : query_body_clause* select_or_group_clause query_continuation?
func (*QueryBodyExpr) End ¶
func (q *QueryBodyExpr) End() token.Position
func (*QueryBodyExpr) Pos ¶
func (q *QueryBodyExpr) Pos() token.Position
func (*QueryBodyExpr) String ¶
func (q *QueryBodyExpr) String() string
func (*QueryBodyExpr) TokenLiteral ¶
func (q *QueryBodyExpr) TokenLiteral() string
type QueryContinuationExpr ¶
type QueryContinuationExpr struct { Token token.Token // 'into' Var string Expr Expression //QueryBodyExpr }
query_continuation : INTO identifier query_body
func (*QueryContinuationExpr) End ¶
func (q *QueryContinuationExpr) End() token.Position
func (*QueryContinuationExpr) Pos ¶
func (q *QueryContinuationExpr) Pos() token.Position
func (*QueryContinuationExpr) String ¶
func (q *QueryContinuationExpr) String() string
func (*QueryContinuationExpr) TokenLiteral ¶
func (q *QueryContinuationExpr) TokenLiteral() string
type QueryExpr ¶
type QueryExpr struct { Token token.Token //'from' From Expression //FromExpr QueryBody Expression //QueryBodyExpr }
query_expression : from_clause query_body
func (*QueryExpr) TokenLiteral ¶
type RangeLiteral ¶
type RangeLiteral struct { Token token.Token StartIdx Expression EndIdx Expression }
///////////////////////////////////////////////////////
RANGE LITERAL(..) //
///////////////////////////////////////////////////////
func (*RangeLiteral) End ¶
func (r *RangeLiteral) End() token.Position
func (*RangeLiteral) Pos ¶
func (r *RangeLiteral) Pos() token.Position
func (*RangeLiteral) String ¶
func (r *RangeLiteral) String() string
func (*RangeLiteral) TokenLiteral ¶
func (r *RangeLiteral) TokenLiteral() string
type RegExLiteral ¶
/////////////////////////////////////////////////////////
REGEX LITERAL //
/////////////////////////////////////////////////////////
func (*RegExLiteral) End ¶
func (rel *RegExLiteral) End() token.Position
func (*RegExLiteral) Pos ¶
func (rel *RegExLiteral) Pos() token.Position
func (*RegExLiteral) String ¶
func (rel *RegExLiteral) String() string
func (*RegExLiteral) TokenLiteral ¶
func (rel *RegExLiteral) TokenLiteral() string
type ReturnStatement ¶
type ReturnStatement struct { Token token.Token ReturnValue Expression //for old campatibility ReturnValues []Expression }
/////////////////////////////////////////////////////////
RETURN STATEMENT //
/////////////////////////////////////////////////////////
func (*ReturnStatement) End ¶
func (rs *ReturnStatement) End() token.Position
func (*ReturnStatement) Pos ¶
func (rs *ReturnStatement) Pos() token.Position
func (*ReturnStatement) String ¶
func (rs *ReturnStatement) String() string
func (*ReturnStatement) TokenLiteral ¶
func (rs *ReturnStatement) TokenLiteral() string
type SelectExpr ¶
type SelectExpr struct { Token token.Token //'select' Expr Expression }
select_or_group_clause : SELECT expression | GROUP expression BY expression SELECT expression
func (*SelectExpr) End ¶
func (s *SelectExpr) End() token.Position
func (*SelectExpr) Pos ¶
func (s *SelectExpr) Pos() token.Position
func (*SelectExpr) String ¶
func (s *SelectExpr) String() string
func (*SelectExpr) TokenLiteral ¶
func (s *SelectExpr) TokenLiteral() string
type ServiceStatement ¶
type ServiceStatement struct { Token token.Token Name *Identifier //Service name Addr string Debug bool Methods map[string]*FunctionStatement //service's methods Block *BlockStatement //mainly used for debugging purpose //Doc related Doc *CommentGroup // associated documentation; or nil SrcEndToken token.Token }
service servicename on addrs { block } /////////////////////////////////////////////////////////
Service STATEMENT //
/////////////////////////////////////////////////////////
func (*ServiceStatement) Docs ¶
func (s *ServiceStatement) Docs() string
func (*ServiceStatement) End ¶
func (s *ServiceStatement) End() token.Position
func (*ServiceStatement) Pos ¶
func (s *ServiceStatement) Pos() token.Position
func (*ServiceStatement) SrcEnd ¶
func (s *ServiceStatement) SrcEnd() token.Position
func (*ServiceStatement) SrcStart ¶
func (s *ServiceStatement) SrcStart() token.Position
Below two methods implements 'Source' interface.
func (*ServiceStatement) String ¶
func (s *ServiceStatement) String() string
func (*ServiceStatement) TokenLiteral ¶
func (s *ServiceStatement) TokenLiteral() string
type SetterStmt ¶
type SetterStmt struct { Token token.Token Body *BlockStatement }
property's setter statement setter variable is always 'value' like c#
func (*SetterStmt) End ¶
func (s *SetterStmt) End() token.Position
func (*SetterStmt) Pos ¶
func (s *SetterStmt) Pos() token.Position
func (*SetterStmt) String ¶
func (s *SetterStmt) String() string
func (*SetterStmt) TokenLiteral ¶
func (s *SetterStmt) TokenLiteral() string
type SliceExpression ¶
type SliceExpression struct { Token token.Token StartIndex Expression EndIndex Expression }
/////////////////////////////////////////////////////////
SLICE/INDEX //
/////////////////////////////////////////////////////////
func (*SliceExpression) End ¶
func (se *SliceExpression) End() token.Position
func (*SliceExpression) Pos ¶
func (se *SliceExpression) Pos() token.Position
func (*SliceExpression) String ¶
func (se *SliceExpression) String() string
func (*SliceExpression) TokenLiteral ¶
func (se *SliceExpression) TokenLiteral() string
type SpawnStmt ¶
type SpawnStmt struct { Token token.Token Call Expression }
/////////////////////////////////////////////////////////
SPAWN STATEMENT //
/////////////////////////////////////////////////////////
func (*SpawnStmt) TokenLiteral ¶
type StringLiteral ¶
/////////////////////////////////////////////////////////
STRING LITERAL //
/////////////////////////////////////////////////////////
func (*StringLiteral) End ¶
func (s *StringLiteral) End() token.Position
func (*StringLiteral) Pos ¶
func (s *StringLiteral) Pos() token.Position
func (*StringLiteral) String ¶
func (s *StringLiteral) String() string
func (*StringLiteral) TokenLiteral ¶
func (s *StringLiteral) TokenLiteral() string
type StructLiteral ¶
type StructLiteral struct { Token token.Token Pairs map[Expression]Expression RBraceToken token.Token }
/////////////////////////////////////////////////////////
STRUCT LITERAL //
/////////////////////////////////////////////////////////
func (*StructLiteral) End ¶
func (s *StructLiteral) End() token.Position
func (*StructLiteral) Pos ¶
func (s *StructLiteral) Pos() token.Position
func (*StructLiteral) String ¶
func (s *StructLiteral) String() string
func (*StructLiteral) TokenLiteral ¶
func (s *StructLiteral) TokenLiteral() string
type TernaryExpression ¶
type TernaryExpression struct { Token token.Token Condition Expression IfTrue Expression IfFalse Expression }
/////////////////////////////////////////////////////////
TERNARY //
/////////////////////////////////////////////////////////
func (*TernaryExpression) End ¶
func (te *TernaryExpression) End() token.Position
func (*TernaryExpression) Pos ¶
func (te *TernaryExpression) Pos() token.Position
func (*TernaryExpression) String ¶
func (te *TernaryExpression) String() string
func (*TernaryExpression) TokenLiteral ¶
func (te *TernaryExpression) TokenLiteral() string
type ThrowStmt ¶
type ThrowStmt struct { Token token.Token Expr Expression }
throw <expression>
func (*ThrowStmt) TokenLiteral ¶
type TryStmt ¶
type TryStmt struct { Token token.Token Try *BlockStatement Var string Catch *BlockStatement Finally *BlockStatement }
/////////////////////////////////////////////////////////
TRY/CATCH/FINALLY //
///////////////////////////////////////////////////////// TryStmt provide "try/catch/finally" statement.
func (*TryStmt) TokenLiteral ¶
type TupleLiteral ¶
type TupleLiteral struct { Token token.Token Members []Expression RParenToken token.Token }
/////////////////////////////////////////////////////////
Tuple LITERAL //
/////////////////////////////////////////////////////////
func (*TupleLiteral) End ¶
func (t *TupleLiteral) End() token.Position
func (*TupleLiteral) Pos ¶
func (t *TupleLiteral) Pos() token.Position
func (*TupleLiteral) String ¶
func (t *TupleLiteral) String() string
func (*TupleLiteral) TokenLiteral ¶
func (t *TupleLiteral) TokenLiteral() string
type UIntegerLiteral ¶
/////////////////////////////////////////////////////////
UNSIGNED INTEGER LITERAL //
/////////////////////////////////////////////////////////
func (*UIntegerLiteral) End ¶
func (il *UIntegerLiteral) End() token.Position
func (*UIntegerLiteral) Pos ¶
func (il *UIntegerLiteral) Pos() token.Position
func (*UIntegerLiteral) String ¶
func (il *UIntegerLiteral) String() string
func (*UIntegerLiteral) TokenLiteral ¶
func (il *UIntegerLiteral) TokenLiteral() string
type UnlessExpression ¶
type UnlessExpression struct { Token token.Token Condition Expression Consequence *BlockStatement Alternative *BlockStatement }
/////////////////////////////////////////////////////////
UNLESS-ELSE //
/////////////////////////////////////////////////////////
func (*UnlessExpression) End ¶
func (ul *UnlessExpression) End() token.Position
func (*UnlessExpression) Pos ¶
func (ul *UnlessExpression) Pos() token.Position
func (*UnlessExpression) String ¶
func (ul *UnlessExpression) String() string
func (*UnlessExpression) TokenLiteral ¶
func (ul *UnlessExpression) TokenLiteral() string
type UsingStmt ¶
type UsingStmt struct { Token token.Token Expr *AssignExpression Block *BlockStatement }
/////////////////////////////////////////////////////////
USING //
/////////////////////////////////////////////////////////
func (*UsingStmt) TokenLiteral ¶
type WhereExpr ¶
type WhereExpr struct { Token token.Token //'where' Expr Expression }
where_clause : WHERE expression
func (*WhereExpr) TokenLiteral ¶
type WhileLoop ¶
type WhileLoop struct { Token token.Token Condition Expression Block Node //BlockStatement or single expression }
/////////////////////////////////////////////////////////
WHILE LOOP //
/////////////////////////////////////////////////////////