Class: NilNode
- Inherits:
-
LiteralNode
- Object
- Struct
- LiteralNode
- NilNode
- 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 ⇒ NilNode
constructor
A new instance of NilNode.
Constructor Details
#initialize ⇒ NilNode
Returns a new instance of NilNode.
28 29 30 |
# File 'lib/toylang/ast/nodes.rb', line 28 def initialize super(nil) end |
Instance Method Details
#eval(_context) ⇒ Object
45 46 47 |
# File 'lib/toylang/interpreter/evaluation.rb', line 45 def eval(_context) Runtime['nil'] end |