Documentation ¶
Index ¶
- Constants
- func IF[T any](condition bool, a, b T) T
- func IsDigit(str string) bool
- type AstNode
- type BreakStatement
- type CallChainStatement
- type ContinueStatement
- type ExpStatement
- type FunctionOrProcedure
- type GlobalVariables
- type GoToLabelStatement
- type GoToStatement
- type INot
- type IParams
- type IUnary
- type IfStatement
- type ItemStatement
- type LoopStatement
- type MethodStatement
- type ModuleStatement
- type NewObjectStatement
- type OperationType
- type ParamStatement
- type Position
- type PrintConf
- type ReturnStatement
- type Statement
- type StatementType
- type TernaryStatement
- type ThrowStatement
- type Token
- type TryStatement
- type UndefinedStatement
- type VarStatement
Constants ¶
View Source
const And = 57382
View Source
const Break = 57362
View Source
const Catch = 57369
View Source
const Continue = 57367
View Source
const Date = 57387
View Source
const Directive = 57346
View Source
const EOF = -1 // end of file
View Source
const (
EOL = '\n' // end of line.
)
View Source
const Each = 57357
View Source
const Else = 57354
View Source
const ElseIf = 57353
View Source
const EndFunction = 57375
View Source
const EndIf = 57355
View Source
const EndLoop = 57361
View Source
const EndProcedure = 57350
View Source
const EndTry = 57370
View Source
const Export = 57386
View Source
const False = 57384
View Source
const For = 57356
View Source
const Function = 57374
View Source
const Ge = 57380
View Source
const GoTo = 57388
View Source
const GoToLabel = 57366
View Source
const Identifier = 57347
View Source
const If = 57351
View Source
const In = 57358
View Source
const Le = 57379
View Source
const Loop = 57360
View Source
const NeEq = 57378
View Source
const New = 57373
View Source
const Not = 57363
View Source
const Number = 57371
View Source
const Or = 57381
View Source
const Procedure = 57348
View Source
const Return = 57376
View Source
const String = 57372
View Source
const Then = 57352
View Source
const Throw = 57377
View Source
const To = 57359
View Source
const True = 57383
View Source
const Try = 57368
View Source
const UNARY = 57389
View Source
const Undefind = 57385
View Source
const ValueParam = 57364
View Source
const Var = 57349
View Source
const While = 57365
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AstNode ¶
type AstNode struct { ModuleStatement // contains filtered or unexported fields }
type BreakStatement ¶
type BreakStatement struct { }
type CallChainStatement ¶
type CallChainStatement struct { Unit Statement Call Statement // contains filtered or unexported fields }
func (CallChainStatement) Not ¶
func (e CallChainStatement) Not() interface{}
func (CallChainStatement) Unary ¶
func (e CallChainStatement) Unary() interface{}
type ContinueStatement ¶
type ContinueStatement struct { }
type ExpStatement ¶
type ExpStatement struct { Operation OperationType Left interface{} Right interface{} // contains filtered or unexported fields }
func (*ExpStatement) Not ¶
func (e *ExpStatement) Not() interface{}
func (*ExpStatement) Unary ¶
func (e *ExpStatement) Unary() interface{}
type FunctionOrProcedure ¶
type FunctionOrProcedure struct { Type StatementType Name string Body []Statement Export bool Params []ParamStatement Directive string ExplicitVariables map[string]VarStatement }
type GlobalVariables ¶
type GlobalVariables struct { Directive string Export bool Var VarStatement }
type GoToLabelStatement ¶
type GoToLabelStatement struct {
Name string
}
type GoToStatement ¶
type GoToStatement struct {
Label *GoToLabelStatement
}
type IfStatement ¶
type ItemStatement ¶
type LoopStatement ¶
type MethodStatement ¶
type MethodStatement struct { Name string Param []Statement // contains filtered or unexported fields }
func (MethodStatement) Not ¶
func (e MethodStatement) Not() interface{}
func (MethodStatement) Params ¶
func (n MethodStatement) Params() []Statement
type ModuleStatement ¶
type ModuleStatement struct { Name string GlobalVariables map[string]GlobalVariables `json:"GlobalVariables,omitempty"` Body []Statement }
func (*ModuleStatement) Append ¶
func (m *ModuleStatement) Append(item Statement, yylex yyLexer)
func (ModuleStatement) Walk ¶
func (m ModuleStatement) Walk(callBack func(current *FunctionOrProcedure, statement *Statement))
type NewObjectStatement ¶
func (NewObjectStatement) Params ¶
func (n NewObjectStatement) Params() []Statement
type OperationType ¶
type OperationType int
const ( OpPlus OperationType = iota OpMinus OpMul OpDiv OpEq // = OpGt // > OpLt // < OpNe // <> OpLe // <= OpGe // >= OpMod // % - деление по модулю OpOr OpAnd )
func (OperationType) String ¶
func (o OperationType) String() string
type ParamStatement ¶
type ParamStatement struct { Name string IsValue bool `json:"IsValue,omitempty"` Default Statement `json:"Default,omitempty"` }
func (*ParamStatement) DefaultValue ¶
func (p *ParamStatement) DefaultValue(value Statement) *ParamStatement
func (*ParamStatement) Fill ¶
func (p *ParamStatement) Fill(valueParam *Token, identifier Token) *ParamStatement
type ReturnStatement ¶
type ReturnStatement struct {
Param Statement
}
type StatementType ¶
type StatementType int
const ( PFTypeUndefined StatementType = iota PFTypeProcedure PFTypeFunction )
type TernaryStatement ¶
type ThrowStatement ¶
type ThrowStatement struct {
Param Statement
}
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) GetPosition ¶
type TryStatement ¶
type UndefinedStatement ¶
type UndefinedStatement struct{}
type VarStatement ¶
type VarStatement struct { Name string // contains filtered or unexported fields }
func (VarStatement) Not ¶
func (e VarStatement) Not() interface{}
func (VarStatement) Unary ¶
func (e VarStatement) Unary() interface{}
Click to show internal directories.
Click to hide internal directories.