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
Interpreter
Interpreter
Reference
Object
Direct Known Subclasses
InterpreterLISP
InterpreterRPN
Defined in:
calc.cr
Constructors
.new
(ast : AST)
Instance Method Summary
#interpret
#visit
(node : BinOp) : Int32
#visit
(node : UnaryOp) : Int32
#visit
(node : Num) : Int32
Constructor Detail
def self.
new
(ast :
AST
)
#
[
View source
]
Instance Method Detail
def
interpret
#
[
View source
]
def
visit
(node :
BinOp
) : Int32
#
[
View source
]
def
visit
(node :
UnaryOp
) : Int32
#
[
View source
]
def
visit
(node :
Num
) : Int32
#
[
View source
]