Versions in this module Expand all Collapse all v3 v3.0.5 Aug 26, 2023 v3.0.4 Aug 10, 2023 v3.0.3 Aug 10, 2023 v3.0.2 Aug 10, 2023 v3.0.1 Aug 10, 2023 v3.0.0 Aug 10, 2023 Changes in this version + var OpcodeNames = [...]string + var OpcodeOperands = [...][]int + func ReadOperands(numOperands []int, ins []byte) (operands []int, offset int) + func StripCR(b []byte, comment bool) []byte + type ArrayLit struct + Elements []Expr + LBrack Pos + RBrack Pos + func (e *ArrayLit) End() Pos + func (e *ArrayLit) Pos() Pos + func (e *ArrayLit) String() string + type AssignStmt struct + LHS []Expr + RHS []Expr + Token token.Token + TokenPos Pos + func (s *AssignStmt) End() Pos + func (s *AssignStmt) Pos() Pos + func (s *AssignStmt) String() string + type BadExpr struct + From Pos + To Pos + func (e *BadExpr) End() Pos + func (e *BadExpr) Pos() Pos + func (e *BadExpr) String() string + type BadStmt struct + From Pos + To Pos + func (s *BadStmt) End() Pos + func (s *BadStmt) Pos() Pos + func (s *BadStmt) String() string + type BinaryExpr struct + LHS Expr + RHS Expr + Token token.Token + TokenPos Pos + func (e *BinaryExpr) End() Pos + func (e *BinaryExpr) Pos() Pos + func (e *BinaryExpr) String() string + type BlockStmt struct + LBrace Pos + RBrace Pos + Stmts []Stmt + func (s *BlockStmt) End() Pos + func (s *BlockStmt) Pos() Pos + func (s *BlockStmt) String() string + type BoolLit struct + Literal string + Value bool + ValuePos Pos + func (e *BoolLit) End() Pos + func (e *BoolLit) Pos() Pos + func (e *BoolLit) String() string + type BranchStmt struct + Label *Ident + Token token.Token + TokenPos Pos + func (s *BranchStmt) End() Pos + func (s *BranchStmt) Pos() Pos + func (s *BranchStmt) String() string + type CallExpr struct + Args []Expr + Ellipsis Pos + Func Expr + LParen Pos + RParen Pos + func (e *CallExpr) End() Pos + func (e *CallExpr) Pos() Pos + func (e *CallExpr) String() string + type CharLit struct + Literal string + Value rune + ValuePos Pos + func (e *CharLit) End() Pos + func (e *CharLit) Pos() Pos + func (e *CharLit) String() string + type CondExpr struct + ColonPos Pos + Cond Expr + False Expr + QuestionPos Pos + True Expr + func (e *CondExpr) End() Pos + func (e *CondExpr) Pos() Pos + func (e *CondExpr) String() string + type EmptyStmt struct + Implicit bool + Semicolon Pos + func (s *EmptyStmt) End() Pos + func (s *EmptyStmt) Pos() Pos + func (s *EmptyStmt) String() string + type Error struct + Msg string + Pos SourceFilePos + func (e Error) Error() string + type ErrorExpr struct + ErrorPos Pos + Expr Expr + LParen Pos + RParen Pos + func (e *ErrorExpr) End() Pos + func (e *ErrorExpr) Pos() Pos + func (e *ErrorExpr) String() string + type ErrorList []*Error + func (p *ErrorList) Add(pos SourceFilePos, msg string) + func (p ErrorList) Err() error + func (p ErrorList) Error() string + func (p ErrorList) Len() int + func (p ErrorList) Less(i, j int) bool + func (p ErrorList) Sort() + func (p ErrorList) Swap(i, j int) + type ExportStmt struct + ExportPos Pos + Result Expr + func (s *ExportStmt) End() Pos + func (s *ExportStmt) Pos() Pos + func (s *ExportStmt) String() string + type Expr interface + type ExprStmt struct + Expr Expr + func (s *ExprStmt) End() Pos + func (s *ExprStmt) Pos() Pos + func (s *ExprStmt) String() string + type File struct + InputFile *SourceFile + Stmts []Stmt + func (n *File) End() Pos + func (n *File) Pos() Pos + func (n *File) String() string + type FloatLit struct + Literal string + Value float64 + ValuePos Pos + func (e *FloatLit) End() Pos + func (e *FloatLit) Pos() Pos + func (e *FloatLit) String() string + type ForInStmt struct + Body *BlockStmt + ForPos Pos + Iterable Expr + Key *Ident + Value *Ident + func (s *ForInStmt) End() Pos + func (s *ForInStmt) Pos() Pos + func (s *ForInStmt) String() string + type ForStmt struct + Body *BlockStmt + Cond Expr + ForPos Pos + Init Stmt + Post Stmt + func (s *ForStmt) End() Pos + func (s *ForStmt) Pos() Pos + func (s *ForStmt) String() string + type FuncLit struct + Body *BlockStmt + Type *FuncType + func (e *FuncLit) End() Pos + func (e *FuncLit) Pos() Pos + func (e *FuncLit) String() string + type FuncType struct + FuncPos Pos + Params *IdentList + func (e *FuncType) End() Pos + func (e *FuncType) Pos() Pos + func (e *FuncType) String() string + type Ident struct + Name string + NamePos Pos + func (e *Ident) End() Pos + func (e *Ident) Pos() Pos + func (e *Ident) String() string + type IdentList struct + LParen Pos + List []*Ident + RParen Pos + VarArgs bool + func (n *IdentList) End() Pos + func (n *IdentList) NumFields() int + func (n *IdentList) Pos() Pos + func (n *IdentList) String() string + type IfStmt struct + Body *BlockStmt + Cond Expr + Else Stmt + IfPos Pos + Init Stmt + func (s *IfStmt) End() Pos + func (s *IfStmt) Pos() Pos + func (s *IfStmt) String() string + type ImmutableExpr struct + ErrorPos Pos + Expr Expr + LParen Pos + RParen Pos + func (e *ImmutableExpr) End() Pos + func (e *ImmutableExpr) Pos() Pos + func (e *ImmutableExpr) String() string + type ImportExpr struct + ModuleName string + Token token.Token + TokenPos Pos + func (e *ImportExpr) End() Pos + func (e *ImportExpr) Pos() Pos + func (e *ImportExpr) String() string + type IncDecStmt struct + Expr Expr + Token token.Token + TokenPos Pos + func (s *IncDecStmt) End() Pos + func (s *IncDecStmt) Pos() Pos + func (s *IncDecStmt) String() string + type IndexExpr struct + Expr Expr + Index Expr + LBrack Pos + RBrack Pos + func (e *IndexExpr) End() Pos + func (e *IndexExpr) Pos() Pos + func (e *IndexExpr) String() string + type IntLit struct + Literal string + Value int64 + ValuePos Pos + func (e *IntLit) End() Pos + func (e *IntLit) Pos() Pos + func (e *IntLit) String() string + type MapElementLit struct + ColonPos Pos + Key string + KeyPos Pos + Value Expr + func (e *MapElementLit) End() Pos + func (e *MapElementLit) Pos() Pos + func (e *MapElementLit) String() string + type MapLit struct + Elements []*MapElementLit + LBrace Pos + RBrace Pos + func (e *MapLit) End() Pos + func (e *MapLit) Pos() Pos + func (e *MapLit) String() string + type Node interface + End func() Pos + Pos func() Pos + String func() string + type Opcode = byte + const OpAndJump + const OpArray + const OpBComplement + const OpBinaryOp + const OpCall + const OpClosure + const OpConstant + const OpDefineLocal + const OpEqual + const OpError + const OpFalse + const OpGetBuiltin + const OpGetFree + const OpGetFreePtr + const OpGetGlobal + const OpGetLocal + const OpGetLocalPtr + const OpImmutable + const OpIndex + const OpIteratorInit + const OpIteratorKey + const OpIteratorNext + const OpIteratorValue + const OpJump + const OpJumpFalsy + const OpLNot + const OpMap + const OpMinus + const OpNotEqual + const OpNull + const OpOrJump + const OpPop + const OpReturn + const OpSetFree + const OpSetGlobal + const OpSetLocal + const OpSetSelFree + const OpSetSelGlobal + const OpSetSelLocal + const OpSliceIndex + const OpSuspend + const OpTrue + type ParenExpr struct + Expr Expr + LParen Pos + RParen Pos + func (e *ParenExpr) End() Pos + func (e *ParenExpr) Pos() Pos + func (e *ParenExpr) String() string + type Parser struct + func NewParser(file *SourceFile, src []byte, trace io.Writer) *Parser + func (p *Parser) ParseFile() (file *File, err error) + type Pos int + const NoPos + func (p Pos) IsValid() bool + type ReturnStmt struct + Result Expr + ReturnPos Pos + func (s *ReturnStmt) End() Pos + func (s *ReturnStmt) Pos() Pos + func (s *ReturnStmt) String() string + type ScanMode int + const DontInsertSemis + const ScanComments + type Scanner struct + func NewScanner(file *SourceFile, src []byte, errorHandler ScannerErrorHandler, mode ScanMode) *Scanner + func (s *Scanner) ErrorCount() int + func (s *Scanner) Scan() (tok token.Token, literal string, pos Pos) + type ScannerErrorHandler func(pos SourceFilePos, msg string) + type SelectorExpr struct + Expr Expr + Sel Expr + func (e *SelectorExpr) End() Pos + func (e *SelectorExpr) Pos() Pos + func (e *SelectorExpr) String() string + type SliceExpr struct + Expr Expr + High Expr + LBrack Pos + Low Expr + RBrack Pos + func (e *SliceExpr) End() Pos + func (e *SliceExpr) Pos() Pos + func (e *SliceExpr) String() string + type SourceFile struct + Base int + Lines []int + Name string + Size int + func (f *SourceFile) AddLine(offset int) + func (f *SourceFile) FileSetPos(offset int) Pos + func (f *SourceFile) LineCount() int + func (f *SourceFile) LineStart(line int) Pos + func (f *SourceFile) Offset(p Pos) int + func (f *SourceFile) Position(p Pos) (pos SourceFilePos) + func (f *SourceFile) Set() *SourceFileSet + type SourceFilePos struct + Column int + Filename string + Line int + Offset int + func (p SourceFilePos) IsValid() bool + func (p SourceFilePos) String() string + type SourceFileSet struct + Base int + Files []*SourceFile + LastFile *SourceFile + func NewFileSet() *SourceFileSet + func (s *SourceFileSet) AddFile(filename string, base, size int) *SourceFile + func (s *SourceFileSet) File(p Pos) (f *SourceFile) + func (s *SourceFileSet) Position(p Pos) (pos SourceFilePos) + type Stmt interface + type StringLit struct + Literal string + Value string + ValuePos Pos + func (e *StringLit) End() Pos + func (e *StringLit) Pos() Pos + func (e *StringLit) String() string + type UnaryExpr struct + Expr Expr + Token token.Token + TokenPos Pos + func (e *UnaryExpr) End() Pos + func (e *UnaryExpr) Pos() Pos + func (e *UnaryExpr) String() string + type UndefinedLit struct + TokenPos Pos + func (e *UndefinedLit) End() Pos + func (e *UndefinedLit) Pos() Pos + func (e *UndefinedLit) String() string Other modules containing this package github.com/DarkByteLabs/tengo/v2