Class: TRuby::IR::Block

Inherits:
Node
  • Object
show all
Defined in:
lib/t_ruby/ir.rb

Overview

Block of statements

Instance Attribute Summary collapse

Attributes inherited from Node

#location, #metadata, #type_info

Instance Method Summary collapse

Methods inherited from Node

#accept, #transform

Constructor Details

#initialize(statements: [], **opts) ⇒ Block

Returns a new instance of Block.



154
155
156
157
# File 'lib/t_ruby/ir.rb', line 154

def initialize(statements: [], **opts)
  super(**opts)
  @statements = statements
end

Instance Attribute Details

#statementsObject

Returns the value of attribute statements.



152
153
154
# File 'lib/t_ruby/ir.rb', line 152

def statements
  @statements
end

Instance Method Details

#childrenObject



159
160
161
# File 'lib/t_ruby/ir.rb', line 159

def children
  @statements
end