Class: Omnium::Parser::AST::Block
- Defined in:
- lib/omnium/parser/ast/block.rb
Overview
A block represents declarations and compound statements
Instance Attribute Summary collapse
-
#compound_statement ⇒ Object
readonly
Returns the value of attribute compound_statement.
-
#variable_declarations ⇒ Object
readonly
Returns the value of attribute variable_declarations.
Instance Method Summary collapse
-
#initialize(variable_declarations, compound_statement) ⇒ Block
constructor
A new instance of Block.
Constructor Details
#initialize(variable_declarations, compound_statement) ⇒ Block
Returns a new instance of Block.
10 11 12 13 |
# File 'lib/omnium/parser/ast/block.rb', line 10 def initialize(variable_declarations, compound_statement) @variable_declarations = variable_declarations @compound_statement = compound_statement end |
Instance Attribute Details
#compound_statement ⇒ Object (readonly)
Returns the value of attribute compound_statement.
8 9 10 |
# File 'lib/omnium/parser/ast/block.rb', line 8 def compound_statement @compound_statement end |
#variable_declarations ⇒ Object (readonly)
Returns the value of attribute variable_declarations.
8 9 10 |
# File 'lib/omnium/parser/ast/block.rb', line 8 def variable_declarations @variable_declarations end |