LxLang::Tokenizer
Inherits Reference < Object
Constants
SPEC = {/;/ => T::StatementEnd, /\{/ => T::BlockStart, /\}/ => T::BlockEnd, /\(/ => T::ParenStart, /\)/ => T::ParenEnd, /[><]=?/ => T::Comparison, /[=!]=/ => T::Comparison, /&&/ => T::And, /\|\|/ => T::Or, /\!/ => T::Not, /\=/ => T::Assign, /\:/ => T::TypeAssign, /\|/ => T::Pipe, /\,/ => T::Separator, /\./ => T::Navigator, /\bin\b/ => T::In, /\bout\b/ => T::Out, /\bpub\b/ => T::Public, /\bwhile\b/ => T::While, /\bloop\b/ => T::Loop, /\bbreak\b/ => T::Break, /\bret(?:urn)?\b/ => T::Return, /\bif\b/ => T::If, /\belse\b/ => T::Else, /\btrue\b/ => T::Bool, /\bfalse\b/ => T::Bool, /\bnil\b/ => T::Nil, /\b[A-Z][A-Z\d_]*\b/ => T::Constant, /\b[a-z][a-zA-Z\d_]*\b/ => T::Identifier, /\@?\b[A-Z][a-zA-Z\d_]*\b/ => T::Type, /[\*\/\%]/ => T::Multiplicative, /[\+\-]/ => T::Additive, /\d+_?i16/ => T::Int16, /\d+_?i32/ => T::Int32, /\d+(?:_?i8)?/ => T::Int8, /\"[^\"]*\"/ => T::String, /\'[^\']\'/ => T::Char}
Constructors
new(string : String)
SourceInstance methods
advance_line
Sourcefabricate(token_type : Token.class)
Sourceline_char
Sourcenext_token
Sourcestring
Sourcestring=(string : String)
Source