class Funk::Parser
Defined in:
funk/syntax/parser.cr
Constant Summary
-
PRECEDENCES =
{TokenType::Equal => Precedences::EQUALS, TokenType::NotEqual => Precedences::EQUALS, TokenType::LessThan => Precedences::LESS_GREATER, TokenType::LessEqual => Precedences::LESS_GREATER, TokenType::GreaterThan => Precedences::LESS_GREATER, TokenType::GreaterEqual => Precedences::LESS_GREATER, TokenType::Plus => Precedences::SUM, TokenType::Minus => Precedences::SUM, TokenType::Divide => Precedences::PRODUCT, TokenType::Multiply => Precedences::PRODUCT, TokenType::LeftParen => Precedences::CALL} of TokenType => Precedences
-
VALID_INFIX_ASSIGNMENTS =
{TokenType::Assignment, TokenType::PlusAssign, TokenType::MinusAssign, TokenType::MultiplyAssign, TokenType::DivideAssign, TokenType::PowerAssign}
Constructors
Instance Method Summary
Constructor Detail
Instance Method Detail
def
errors : Array(String)
#
def
errors=(errors : Array(String))
#
def
index=(index : Int32)
#
def
lookahead=(lookahead : Int32)
#
def
prefix_parsers=(prefix_parsers : Hash(
TokenType, Proc(
Ast)))
#
def
tokens=(tokens : Array(
Token))
#
def
tree=(tree : Array(
Ast))
#