class

Sheety::Tokens::ArrayConstant

Inherits Sheety::Tokens::Operand < Sheety::Token < Reference < Object

Array constant token (e.g., {1, 2, 3}, {{1,2},{3,4}})

Constants

ARRAY_REGEX = /^\s*\{(?P<name>(?>[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*)\}\s*/

Matches array constants enclosed in braces {elements} where elements can be separated by , (column) or ; (row)

Class methods

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

Instance methods

array?
Source
array_content
Source
compile

Compile the token to executable code

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

Try to match the token pattern against the input string

Source
parse_elements

Parse the array content to extract elements This is a simple parser - doesn't handle nested arrays perfectly

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

Process the match result and populate attributes

Source