Class: TrueNode
- Inherits:
-
LiteralNode
- Object
- Struct
- LiteralNode
- TrueNode
- Defined in:
- lib/toylang/ast/nodes.rb,
lib/toylang/interpreter/evaluation.rb
Instance Attribute Summary
Attributes inherited from LiteralNode
Instance Method Summary collapse
- #eval(_context) ⇒ Object
-
#initialize ⇒ TrueNode
constructor
A new instance of TrueNode.
Constructor Details
#initialize ⇒ TrueNode
Returns a new instance of TrueNode.
16 17 18 |
# File 'lib/toylang/ast/nodes.rb', line 16 def initialize super(true) end |
Instance Method Details
#eval(_context) ⇒ Object
33 34 35 |
# File 'lib/toylang/interpreter/evaluation.rb', line 33 def eval(_context) Runtime['true'] end |