Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultOutputHandler(store *Store, v ...interface{})
- func DumpExprs(exprs []Expr, prefix string) string
- func DumpStmts(stmts []Stmt, prefix string) string
- func EnableDebug(level int)
- func EnableErrorVerbose()
- func GetPool(size int) *sync.Pool
- func GetTypeName(val interface{}) string
- func InitStmts(stmts []Stmt, w *Walker) error
- func IsBool(val interface{}) bool
- func IsFloat(val interface{}) bool
- func IsInt(val interface{}) bool
- func IsNull(val interface{}) bool
- func IsString(val interface{}) bool
- func RunSrc(src string, store *Store) (interface{}, error)
- func RunStmts(stmts []Stmt, store *Store) (interface{}, error)
- func ToBool(val interface{}) bool
- func ToFloat(val interface{}) float64
- func ToInt(val interface{}) int
- func ToString(val interface{}) string
- type BreakStmt
- type CalcExpr
- type CondExpr
- type ContinueStmt
- type Dump
- type EchoStmt
- type Expr
- type ExprImpl
- type ExprStmt
- type ForStmt
- type ForeachStmt
- type ForkHandler
- type Func
- type FuncExpr
- type FuncStmt
- type IdentExpr
- type IfStmt
- type IncrExpr
- type Init
- type Lexer
- type Loader
- type MethodExpr
- type OutputHandler
- type Pos
- type PosImpl
- type Position
- type Range
- type ReturnStmt
- type Run
- type Scanner
- type Slice
- type Stmt
- type StmtImpl
- type Store
- func (store *Store) Fork() *Store
- func (store *Store) GetArgs() []interface{}
- func (store *Store) GetFunc(name string) Func
- func (store *Store) GetLocation() *time.Location
- func (store *Store) GetMethod(typ, name string) Func
- func (store *Store) GetVar(name string, index int) interface{}
- func (store *Store) GetVar0() interface{}
- func (store *Store) Load(name string) error
- func (store *Store) Output(v ...interface{})
- func (store *Store) Reset()
- func (store *Store) ResetFlags()
- func (store *Store) ResetVars()
- func (store *Store) SetForkHandler(forkHandler ForkHandler)
- func (store *Store) SetLoader(loader Loader)
- func (store *Store) SetLocation(name string) error
- func (store *Store) SetOutputHandler(outputHandler OutputHandler)
- func (store *Store) SetVar(name string, index int, value interface{})
- func (store *Store) SetVar0(val interface{})
- type StorePool
- type Token
- type TypeExpr
- type TypeName
- type Walker
Constants ¶
View Source
const ( EOF = -1 EOL = '\n' )
View Source
const ( ADD = int('+') SUB = int('-') MUL = int('*') DIV = int('/') MOD = int('%') AND = int('&') OR = int('|') XOR = int('^') NOT = int('!') GT = int('>') LT = int('<') CONCAT = int('.') REV = int('~') )
View Source
const ( TypeUnknown int = iota TypeInt TypeFloat TypeString TypeBool TypeNull )
View Source
const ADDADD = 57365
View Source
const ADDEQ = 57384
View Source
const ANDAND = 57373
View Source
const ANDEQ = 57390
View Source
const ARROW = 57359
View Source
const AS = 57358
View Source
const BREAK = 57360
View Source
const CONCATEQ = 57383
View Source
const CONTINUE = 57361
View Source
const DIVEQ = 57387
View Source
const ECHO = 57375
View Source
const ELSE = 57355
View Source
const EQEQ = 57369
View Source
const EQEQEQ = 57377
View Source
const FALSE = 57350
View Source
const FLOAT = 57347
View Source
const FOR = 57356
View Source
const FOREACH = 57357
View Source
const FUNCNAME = 57364
View Source
const FUNCTION = 57362
View Source
const GTEQ = 57370
View Source
const IDENT = 57352
View Source
const IF = 57354
View Source
const INT = 57346
View Source
const ISSET = 57376
View Source
const LEFT = 57367
View Source
const LEFTEQ = 57393
View Source
const LTEQ = 57371
View Source
const LTEQGT = 57379
View Source
const METHOD = 57353
View Source
const MODEQ = 57388
View Source
const MULEQ = 57386
View Source
const NEQ = 57372
View Source
const NEQEQ = 57378
View Source
const NULL = 57351
View Source
const NULLEQ = 57380
View Source
const OREQ = 57391
View Source
const OROR = 57374
View Source
const POW = 57382
View Source
const POWEQ = 57389
View Source
const RETURN = 57363
View Source
const RIGHT = 57368
View Source
const RIGHTEQ = 57394
View Source
const STRING = 57348
View Source
const SUBEQ = 57385
View Source
const SUBSUB = 57366
View Source
const TRUE = 57349
View Source
const TRUEEQ = 57381
View Source
const UNARY = 57395
View Source
const XOREQ = 57392
Variables ¶
View Source
var RPC *time.Location
Functions ¶
func DefaultOutputHandler ¶
func DefaultOutputHandler(store *Store, v ...interface{})
func EnableDebug ¶
func EnableDebug(level int)
func EnableErrorVerbose ¶
func EnableErrorVerbose()
func GetTypeName ¶
func GetTypeName(val interface{}) string
Types ¶
type ContinueStmt ¶
type ContinueStmt struct {
StmtImpl
}
func (*ContinueStmt) Dump ¶
func (stmt *ContinueStmt) Dump(prefix string) string
func (*ContinueStmt) Init ¶
func (stmt *ContinueStmt) Init(w *Walker) error
func (*ContinueStmt) Run ¶
func (stmt *ContinueStmt) Run(store *Store) (interface{}, error)
type ForStmt ¶
type ForeachStmt ¶
type ForeachStmt struct { StmtImpl Expr Expr IndexKey int IdentKey string IndexValue int IdentValue string Stmts []Stmt }
func (*ForeachStmt) Dump ¶
func (stmt *ForeachStmt) Dump(prefix string) string
func (*ForeachStmt) Init ¶
func (stmt *ForeachStmt) Init(w *Walker) error
func (*ForeachStmt) Run ¶
func (stmt *ForeachStmt) Run(store *Store) (interface{}, error)
type ForkHandler ¶
type ForkHandler func() *Store
type FuncStmt ¶
type IfStmt ¶
type MethodExpr ¶
func (*MethodExpr) Dump ¶
func (expr *MethodExpr) Dump(prefix string) string
func (*MethodExpr) Init ¶
func (expr *MethodExpr) Init(w *Walker) error
func (*MethodExpr) Run ¶
func (expr *MethodExpr) Run(store *Store) (interface{}, error)
type OutputHandler ¶
type OutputHandler func(*Store, ...interface{})
type PosImpl ¶
type PosImpl struct {
// contains filtered or unexported fields
}
func (*PosImpl) SetPosition ¶
type ReturnStmt ¶
func (*ReturnStmt) Dump ¶
func (stmt *ReturnStmt) Dump(prefix string) string
func (*ReturnStmt) Init ¶
func (stmt *ReturnStmt) Init(w *Walker) error
func (*ReturnStmt) Run ¶
func (stmt *ReturnStmt) Run(store *Store) (interface{}, error)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetLocation ¶
func (*Store) ResetFlags ¶
func (store *Store) ResetFlags()
func (*Store) SetForkHandler ¶
func (store *Store) SetForkHandler(forkHandler ForkHandler)
func (*Store) SetLocation ¶
func (*Store) SetOutputHandler ¶
func (store *Store) SetOutputHandler(outputHandler OutputHandler)
type StorePool ¶
type StorePool struct {
// contains filtered or unexported fields
}
func NewStorePool ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.