class Taro::Compiler::Lexer
- Taro::Compiler::Lexer
- Reference
- Object
Direct Known Subclasses
Defined in:
compiler/lexer/lexer.crConstructors
Instance Method Summary
-
#advance_token
Move to a new token with a new buffer.
- #analyzer : Analyzer
- #analyzer=(analyzer : Analyzer)
- #brace_stack : Array(Char)
- #brace_stack=(brace_stack : Array(Char))
- #check_for_keyword
- #column : Int32
- #column=(column : Int32)
- #consume_identifier
- #consume_identifier_u
- #consume_numeric
- #consume_single_line_comment
- #consume_whitespace
- #context_stack : Array(Context)
- #context_stack=(context_stack : Array(Context))
- #current_brace : Char
- #current_char : Char
- #current_context
- #current_location
- #current_token : Token
- #current_token=(current_token : Token)
- #finalize_token
- #finished? : Bool
- #last_char : Char
- #last_char=(last_char : Char)
- #lex_all
- #peek_char : Char
-
#pop_brace(type : Symbol)
Attempts to pop the top bracing character from the stack, but only if it matches the given type.
- #pop_context
- #push_brace(type : Symbol)
- #push_context(context : Context)
-
#read_char(save_in_buffer = true) : Char
Consume a single character from the source.
- #read_char_literal_token
- #read_normal_token
- #read_string_token
- #read_token
- #replace_escape_characters(raw)
- #row : Int32
- #row=(row : Int32)
- #skip_char : Char
- #source_file : String
- #source_file=(source_file : String)
- #token_is_empty?
- #tokens : Array(Token)
- #tokens=(tokens : Array(Token))
Constructor Detail
Instance Method Detail
def pop_brace(type : Symbol)
#
Attempts to pop the top bracing character from the stack, but only if it matches the given type. Returns false if the type does not match.