class

Lexer

Inherits Reference / Object

Constants

SIMPLE_TOKENS = {'.' => "dot", '*' => "star", ']' => "rbracket", ',' => "comma", ':' => "colon", '@' => "current", '(' => "lparen", ')' => "rparen", '{' => "lbrace", '}' => "rbrace"}
START_IDENTIFIER = ((Set.new('a'..'z')) + (Set.new('A'..'Z'))) + Set {'_'}
VALID_IDENTIFIER = START_IDENTIFIER + (Set.new('0'..'9'))
VALID_NUMBER = Set.new('0'..'9')
WHITESPACE = Set {' ', '\t', '\n', '\r'}

Constructors

Instance methods

chars
Source
chars=(chars : Array(Char))
Source
current
Source
current=(current : Char | Nil)
Source
expression
Source
expression=(expression : String)
Source
length
Source
length=(length : Int32)
Source
position
Source
position=(position : Int32)
Source
tokenize(expression : String) : Array(Token)
Source