Class: Baba::Stmt::Block
- Inherits:
-
Object
- Object
- Baba::Stmt::Block
- Defined in:
- lib/baba/stmt.rb
Instance Attribute Summary collapse
-
#statements ⇒ Object
readonly
Returns the value of attribute statements.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(statements) ⇒ Block
constructor
A new instance of Block.
Constructor Details
#initialize(statements) ⇒ Block
Returns a new instance of Block.
6 7 8 |
# File 'lib/baba/stmt.rb', line 6 def initialize(statements) @statements = statements end |
Instance Attribute Details
#statements ⇒ Object (readonly)
Returns the value of attribute statements.
4 5 6 |
# File 'lib/baba/stmt.rb', line 4 def statements @statements end |
Instance Method Details
#accept(visitor) ⇒ Object
10 11 12 |
# File 'lib/baba/stmt.rb', line 10 def accept(visitor) visitor.visit_block_stmt(self) end |