Versions in this module Expand all Collapse all v1 v1.6.3 May 22, 2021 v1.6.2 May 22, 2021 Changes in this version + const IndentationLevel + const MetaDataGeneral + const MetaDataPostComment + const MetaDataPreComment + const NodeAND + const NodeAS + const NodeASSIGN + const NodeBREAK + const NodeCOMPACCESS + const NodeCONTINUE + const NodeDIV + const NodeDIVINT + const NodeEOF + const NodeEQ + const NodeEXCEPT + const NodeFALSE + const NodeFINALLY + const NodeFUNC + const NodeFUNCCALL + const NodeGEQ + const NodeGT + const NodeGUARD + const NodeHASPREFIX + const NodeHASSUFFIX + const NodeIDENTIFIER + const NodeIF + const NodeIMPORT + const NodeIN + const NodeKINDMATCH + const NodeKVP + const NodeLEQ + const NodeLET + const NodeLIKE + const NodeLIST + const NodeLOOP + const NodeLT + const NodeMAP + const NodeMINUS + const NodeMODINT + const NodeMUTEX + const NodeNEQ + const NodeNOT + const NodeNOTIN + const NodeNULL + const NodeNUMBER + const NodeOR + const NodeOTHERWISE + const NodePARAMS + const NodePLUS + const NodePRESET + const NodePRIORITY + const NodeRETURN + const NodeSCOPEMATCH + const NodeSINK + const NodeSTATEMATCH + const NodeSTATEMENTS + const NodeSTRING + const NodeSUPPRESSES + const NodeTIMES + const NodeTRUE + const NodeTRY + const RuneEOF + var ErrImpossibleLeftDenotation = errors.New("Term can only start an expression") + var ErrImpossibleNullDenotation = errors.New("Term cannot start an expression") + var ErrLexicalError = errors.New("Lexical error") + var ErrUnexpectedEnd = errors.New("Unexpected end") + var ErrUnexpectedToken = errors.New("Unexpected term") + var ErrUnknownToken = errors.New("Unknown term") + var KeywordMap = map[string]LexTokenID + var NamePattern = regexp.MustCompile("^[A-Za-z][A-Za-z0-9]*$") + var SymbolMap = map[string]LexTokenID + func IsNotEndAndNotTokens(p *parser, tokens []LexTokenID) bool + func IsNotEndAndToken(p *parser, i LexTokenID) bool + func IsValidTokenID(value int) bool + func Lex(name string, input string) chan LexToken + func PrettyPrint(ast *ASTNode) (string, error) + type ASTNode struct + Children []*ASTNode + Meta []MetaData + Name string + Runtime Runtime + Token *LexToken + func ASTFromJSONObject(jsonAST map[string]interface{}) (*ASTNode, error) + func Parse(name string, input string) (*ASTNode, error) + func ParseWithRuntime(name string, input string, rp RuntimeProvider) (*ASTNode, error) + func (n *ASTNode) Equals(other *ASTNode, ignoreTokenPosition bool) (bool, string) + func (n *ASTNode) String() string + func (n *ASTNode) ToJSONObject() map[string]interface{} + type Error struct + Detail string + Line int + Pos int + Source string + Type error + func (pe *Error) Error() string + type LABuffer struct + func NewLABuffer(c chan LexToken, size int) *LABuffer + func (b *LABuffer) Next() (LexToken, bool) + func (b *LABuffer) Peek(pos int) (LexToken, bool) + type LexToken struct + AllowEscapes bool + ID LexTokenID + Identifier bool + Lline int + Lpos int + Lsource string + Pos int + PrefixNewlines int + Val string + func LexToList(name string, input string) []LexToken + func NewLexTokenInstance(t LexToken) *LexToken + func (t LexToken) Equals(other LexToken, ignorePosition bool) (bool, string) + func (t LexToken) PosString() string + func (t LexToken) String() string + func (t LexToken) Type() string + func (t LexToken) Value() string + type LexTokenID int + const TOKENodeKEYWORDS + const TOKENodeSYMBOLS + const TokenAND + const TokenANY + const TokenAS + const TokenASSIGN + const TokenBREAK + const TokenCOLON + const TokenCOMMA + const TokenCOMPACCESS + const TokenCONTINUE + const TokenDIV + const TokenDIVINT + const TokenDOT + const TokenELIF + const TokenELSE + const TokenENDLIST + const TokenEOF + const TokenEQ + const TokenEQUAL + const TokenEXCEPT + const TokenError + const TokenFALSE + const TokenFINALLY + const TokenFOR + const TokenFUNC + const TokenFUNCCALL + const TokenGEQ + const TokenGT + const TokenGUARD + const TokenHASPREFIX + const TokenHASSUFFIX + const TokenIDENTIFIER + const TokenIF + const TokenIMPORT + const TokenIN + const TokenKINDMATCH + const TokenLBRACE + const TokenLBRACK + const TokenLEQ + const TokenLET + const TokenLIKE + const TokenLIST + const TokenLPAREN + const TokenLT + const TokenMAP + const TokenMINUS + const TokenMODINT + const TokenMUTEX + const TokenNEQ + const TokenNOT + const TokenNOTIN + const TokenNULL + const TokenNUMBER + const TokenOR + const TokenOTHERWISE + const TokenPARAMS + const TokenPLUS + const TokenPOSTCOMMENT + const TokenPRECOMMENT + const TokenPRIORITY + const TokenRBRACE + const TokenRBRACK + const TokenRETURN + const TokenRPAREN + const TokenSCOPEMATCH + const TokenSEMICOLON + const TokenSINK + const TokenSTATEMATCH + const TokenSTATEMENTS + const TokenSTRING + const TokenSUPPRESSES + const TokenTIMES + const TokenTRUE + const TokenTRY + type MetaData interface + Type func() string + Value func() string + type Runtime interface + Eval func(Scope, map[string]interface{}, uint64) (interface{}, error) + Validate func() error + type RuntimeProvider interface + Runtime func(node *ASTNode) Runtime + type Scope interface + Clear func() + GetValue func(varName string) (interface{}, bool, error) + Name func() string + NewChild func(name string) Scope + Parent func() Scope + SetLocalValue func(varName string, varValue interface{}) error + SetValue func(varName string, varValue interface{}) error + String func() string + ToJSONObject func() map[string]interface{}