class Funk::Lexer

Defined in:

funk/syntax/lexer.cr

Constant 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

Instance Method Summary

Constructor Detail

def self.new(source : IO, filename : String = "", skip_comments : Bool = true) #

[View source]
def self.new(source : String, filename = "", skip_comments = true) : Lexer #

[View source]

Instance Method Detail

def col : Int32 #

[View source]
def col=(col : Int32) #

[View source]
def current_char : Char #

[View source]
def filename : String #

[View source]
def filename=(filename : String) #

[View source]
def next : Token #

[View source]
def peek : Char #

[View source]
def reader : Reader #

[View source]
def reader=(reader : Reader) #

[View source]
def row : Int32 #

[View source]
def row=(row : Int32) #

[View source]
def skip_comments : Bool #

[View source]
def skip_comments=(skip_comments : Bool) #

[View source]