Class: Omnium::Parser::AST::Block

Inherits:
Base
  • Object
show all
Defined in:
lib/omnium/parser/ast/block.rb

Overview

A block represents declarations and compound statements

Instance Attribute Summary collapse

Instance Method Summary collapse

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_statementObject (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_declarationsObject (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