Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
calc
master
AST
BinOp
Interpreter
InterpreterLISP
InterpreterRPN
Lexer
Num
Parser
Token
UnaryOp
Built with Crystal 1.9.2
2023-10-07 18:19:56 UTC
class
Parser
Parser
Reference
Object
Defined in:
calc.cr
Constructors
.new
(tokens : Array(Token))
Instance Method Summary
#actual_token
#bracket
#calculus
: AST
#eat
(type : String)
#factor
: AST
#number
: AST
#parse
: AST
#term
: AST
Constructor Detail
def self.
new
(tokens : Array(
Token
))
#
[
View source
]
Instance Method Detail
def
actual_token
#
[
View source
]
def
bracket
#
[
View source
]
def
calculus
:
AST
#
[
View source
]
def
eat
(type : String)
#
[
View source
]
def
factor
:
AST
#
[
View source
]
def
number
:
AST
#
[
View source
]
def
parse
:
AST
#
[
View source
]
def
term
:
AST
#
[
View source
]