Class: Rubex::AST::Statement::IfBlock::Else

Inherits:
Base
  • Object
show all
Includes:
Helper
Defined in:
lib/rubex/ast/statement/if_block/else.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods included from Helper

#generate_code_for_statement

Methods inherited from Base

#==, #statement?

Constructor Details

#initialize(statements, location) ⇒ Else

Returns a new instance of Else.



10
11
12
13
# File 'lib/rubex/ast/statement/if_block/else.rb', line 10

def initialize(statements, location)
  super(location)
  @statements = statements
end

Instance Attribute Details

#statementsObject (readonly)

Returns the value of attribute statements.



7
8
9
# File 'lib/rubex/ast/statement/if_block/else.rb', line 7

def statements
  @statements
end

Instance Method Details

#analyse_statement(local_scope) ⇒ Object



15
16
17
18
19
# File 'lib/rubex/ast/statement/if_block/else.rb', line 15

def analyse_statement(local_scope)
  @statements.each do |stat|
    stat.analyse_statement local_scope
  end
end

#generate_code(code, local_scope) ⇒ Object



21
# File 'lib/rubex/ast/statement/if_block/else.rb', line 21

def generate_code(code, local_scope); end

#if_tailObject



23
24
25
# File 'lib/rubex/ast/statement/if_block/else.rb', line 23

def if_tail
  nil
end