Sheety::Token
Inherits Reference < Object
Base class for all tokens in the formula parser
Constructors
new(source : String, context : Hash(String, BigFloat | String) | Nil = nil)
SourceInstance methods
ast(tokens : Array(Token), stack : Array(Token), builder : AstBuilder) : Nil
Add this token to the AST - called during parsing
attr
Sourceattr=(attr : Hash(String, String | Bool | BigFloat | Int32))
Sourceend_match
Sourceend_match=(end_match : Int32)
Sourcematch(s : String) : Regex::MatchData | Nil
Try to match the token pattern against the input string
source
Sourcesource=(source : String)
Sourceupdate_input_tokens(*tokens : Token) : Nil
Update input tokens (used by operators and functions)