class

Sheety::Tokens::Parenthesis

Inherits Sheety::Token < Reference < Object

Parenthesis token for grouping expressions

Constants

PAREN_REGEX = /^(?P<name>[()])/

Class methods

match?(s : String) : Regex::MatchData | Nil
Source

Instance methods

ast(tokens : Array(Token), stack : Array(Token), builder : AstBuilder) : Nil

Add this token to the AST - called during parsing

Source
compile

Compile the token to executable code

Source
has_end
Source
has_start
Source
is_closing?
Source
is_opening?
Source
is_opening_paren
Source
is_opening_paren=(is_opening_paren : Bool)
Source
match(s : String) : Regex::MatchData | Nil

Try to match the token pattern against the input string

Source
process(match : Regex::MatchData) : Nil

Process the match result and populate attributes

Source