Class: TrueNode

Inherits:
LiteralNode show all
Defined in:
lib/toylang/ast/nodes.rb,
lib/toylang/interpreter/evaluation.rb

Instance Attribute Summary

Attributes inherited from LiteralNode

#value

Instance Method Summary collapse

Constructor Details

#initializeTrueNode

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