class Funk::Lexer
- Funk::Lexer
- Reference
- Object
Defined in:
funk/syntax/lexer.crConstant Summary
-
KEYWORDS =
{"def" => TokenType::Def, "if" => TokenType::If, "elsif" => TokenType::ElsIf, "else" => TokenType::Else, "unless" => TokenType::Unless, "while" => TokenType::While, "until" => TokenType::Until, "class" => TokenType::Class, "return" => TokenType::Return, "break" => TokenType::Break, "continue" => TokenType::Continue, "null" => TokenType::Null} of String => TokenType
-
Funk language keyword mappings
-
VALID_IDENT_CHARS =
['_', '!', '?']
-
Valid chars in an identifier
Constructors
- .new(source : IO, filename : String = "", skip_comments : Bool = true)
- .new(source : String, filename = "", skip_comments = true) : Lexer
Instance Method Summary
- #col : Int32
- #col=(col : Int32)
- #current_char : Char
- #filename : String
- #filename=(filename : String)
- #next : Token
- #peek : Char
- #reader : Reader
- #reader=(reader : Reader)
- #row : Int32
- #row=(row : Int32)
- #skip_comments : Bool
- #skip_comments=(skip_comments : Bool)