Class: TRuby::IR::Program
Overview
Program - root node containing all top-level declarations
Instance Attribute Summary collapse
-
#declarations ⇒ Object
Returns the value of attribute declarations.
-
#source_file ⇒ Object
Returns the value of attribute source_file.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(declarations: [], source_file: nil, **opts) ⇒ Program
constructor
A new instance of Program.
Methods inherited from Node
Constructor Details
#initialize(declarations: [], source_file: nil, **opts) ⇒ Program
32 33 34 35 36 |
# File 'lib/t_ruby/ir.rb', line 32 def initialize(declarations: [], source_file: nil, **opts) super(**opts) @declarations = declarations @source_file = source_file end |
Instance Attribute Details
#declarations ⇒ Object
Returns the value of attribute declarations.
30 31 32 |
# File 'lib/t_ruby/ir.rb', line 30 def declarations @declarations end |
#source_file ⇒ Object
Returns the value of attribute source_file.
30 31 32 |
# File 'lib/t_ruby/ir.rb', line 30 def source_file @source_file end |
Instance Method Details
#children ⇒ Object
38 39 40 |
# File 'lib/t_ruby/ir.rb', line 38 def children @declarations end |