Class: KoiReferenceCompiler::IntegerLiteral

Inherits:
SyntaxNode
  • Object
show all
Defined in:
lib/koi-reference-compiler/node_extensions/literals/integer_literal.rb

Instance Attribute Summary

Attributes inherited from SyntaxNode

#elements, #offset, #parent, #text_value

Instance Method Summary collapse

Methods inherited from SyntaxNode

#initialize

Constructor Details

This class inherits a constructor from KoiReferenceCompiler::SyntaxNode

Instance Method Details

#compileObject



4
5
6
# File 'lib/koi-reference-compiler/node_extensions/literals/integer_literal.rb', line 4

def compile
  [ PUSH_INT, self.text_value.to_i ]
end