Class: NumberNode

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

Instance Method Details

#eval(_context) ⇒ Object



21
22
23
# File 'lib/toylang/interpreter/evaluation.rb', line 21

def eval(_context)
  Runtime['Number'].new_with_value(value)
end