Class: Malady::AST::IntegerNode
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(filename, line, value) ⇒ IntegerNode
constructor
A new instance of IntegerNode.
Methods inherited from Node
Constructor Details
#initialize(filename, line, value) ⇒ IntegerNode
Returns a new instance of IntegerNode.
55 56 57 58 |
# File 'lib/malady/ast.rb', line 55 def initialize(filename, line, value) super @value = value.to_i end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
53 54 55 |
# File 'lib/malady/ast.rb', line 53 def value @value end |
Instance Method Details
#bytecode(g) ⇒ Object
60 61 62 63 |
# File 'lib/malady/ast.rb', line 60 def bytecode(g) pos(g) g.push_int value end |