class Taro::Compiler::Parser

Included Modules

Defined in:

compiler/parser/parser.cr

Constructors

Instance Method Summary

Instance methods inherited from module Taro::Compiler::Parsers

parse_code_block(*terminators) parse_code_block, parse_function_def parse_function_def, parse_module_def parse_module_def, parse_param parse_param, parse_param_list(into target : FuncDef) parse_param_list, parse_return_type parse_return_type

Instance methods inherited from class Taro::Compiler::Lexer

advance_token advance_token, analyzer : Analyzer analyzer, analyzer=(analyzer : Analyzer) analyzer=, brace_stack : Array(Char) brace_stack, brace_stack=(brace_stack : Array(Char)) brace_stack=, check_for_keyword check_for_keyword, column : Int32 column, column=(column : Int32) column=, consume_identifier consume_identifier, consume_identifier_u consume_identifier_u, consume_numeric consume_numeric, consume_single_line_comment consume_single_line_comment, consume_whitespace consume_whitespace, context_stack : Array(Context) context_stack, context_stack=(context_stack : Array(Context)) context_stack=, current_brace : Char current_brace, current_char : Char current_char, current_context current_context, current_location current_location, current_token : Token current_token, current_token=(current_token : Token) current_token=, finalize_token finalize_token, finished? : Bool finished?, last_char : Char last_char, last_char=(last_char : Char) last_char=, lex_all lex_all, peek_char : Char peek_char, pop_brace(type : Symbol) pop_brace, pop_context pop_context, push_brace(type : Symbol) push_brace, push_context(context : Context) push_context, read_char(save_in_buffer = true) : Char read_char, read_char_literal_token read_char_literal_token, read_normal_token read_normal_token, read_string_token read_string_token, read_token read_token, replace_escape_characters(raw) replace_escape_characters, row : Int32 row, row=(row : Int32) row=, skip_char : Char skip_char, source_file : String source_file, source_file=(source_file : String) source_file=, token_is_empty? token_is_empty?, tokens : Array(Token) tokens, tokens=(tokens : Array(Token)) tokens=

Constructor methods inherited from class Taro::Compiler::Lexer

new(source : IO, source_file : String, row_start : Int32 = 0, column_start : Int32 = 0) new

Constructor Detail

def self.new(source : IO, source_file : String) #

[View source]

Instance Method Detail

def accept(*types : Token::Type) #

[View source]
def accept_delimiter #

[View source]
def expect(*types : Token::Type) #

[View source]
def expect_delimiter #

[View source]
def expect_delimiter_or_eof #

[View source]
def is_local_var?(name : String) #

[View source]
def modified_ident?(ident : String) #

Returns true if the given identifier is modified (i.e., ends with a ? or !).


[View source]
def parse #

[View source]
def parse_expression #

[View source]
def pop_var_scope #

[View source]
def push_local_var(name : String) #

[View source]
def push_var_scope(scope = Set(String).new) #

[View source]
def skip_space #

[View source]
def skip_space_and_newlines #

[View source]