class Parser::Parser
- Parser::Parser
- Reference
- Object
Defined in:
parser/parser.crConstructors
Instance Method Summary
- #and_expr
-
#assignment
expression → assignment ; assignment → IDENTIFIER "=" assignment | logic_or ; logic_or → logic_and ( "or" logic_and )* ; logic_and → equality ( "and" equality )* ;
- #block
- #comparison
- #consume(expected, message)
- #current
- #current_is?(type)
- #declaration
- #done
- #equality
- #expression
- #expression_st
- #factor
-
#for_st
forStmt → "for" "(" ( varDecl | exprStmt | ";" ) expression? ";" expression? ")" statement ;
- #if_statement
- #invalid(message)
-
#match(*token_types)
Will attempt to match to any of the provided tokens
- #move
- #or_expr
- #parse
- #previous
- #primary
- #print_st
-
#statement
statement → exprStmt | ifStmt | printStmt | whileStmt | ForStmt | block ;
- #syncronise
- #term
- #unary
- #var
- #while_st
Constructor Detail
Instance Method Detail
expression → assignment ; assignment → IDENTIFIER "=" assignment | logic_or ; logic_or → logic_and ( "or" logic_and )* ; logic_and → equality ( "and" equality )* ;
forStmt → "for" "(" ( varDecl | exprStmt | ";" ) expression? ";" expression? ")" statement ;