class Parser::Parser

Defined in:

parser/parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(tokens : Array(Token::Token)) #

[View source]

Instance Method Detail

def and_expr #

[View source]
def assignment #

expression → assignment ; assignment → IDENTIFIER "=" assignment | logic_or ; logic_or → logic_and ( "or" logic_and )* ; logic_and → equality ( "and" equality )* ;


[View source]
def block #

[View source]
def comparison #

[View source]
def consume(expected, message) #

[View source]
def current #

[View source]
def current_is?(type) #

[View source]
def declaration #

[View source]
def done #

[View source]
def equality #

[View source]
def expression #

[View source]
def expression_st #

[View source]
def factor #

[View source]
def for_st #

forStmt → "for" "(" ( varDecl | exprStmt | ";" ) expression? ";" expression? ")" statement ;


[View source]
def if_statement #

[View source]
def invalid(message) #

[View source]
def match(*token_types) #

Will attempt to match to any of the provided tokens


[View source]
def move #

[View source]
def or_expr #

[View source]
def parse #

[View source]
def previous #

[View source]
def primary #

[View source]
def print_st #

[View source]
def statement #

statement → exprStmt | ifStmt | printStmt | whileStmt | ForStmt | block ;


[View source]
def syncronise #

[View source]
def term #

[View source]
def unary #

[View source]
def var #

[View source]
def while_st #

[View source]