refactor if_statement

This commit is contained in:
Torsten Ruger
2016-12-09 13:38:07 +02:00
parent 1e7093c63f
commit fa14e35a50
4 changed files with 27 additions and 20 deletions

View File

@ -1,5 +1,7 @@
module Typed
class IfStatement < Statement
attr_accessor :branch_type , :condition , :if_true , :if_false
module Tree
class IfStatement < Statement
attr_accessor :branch_type , :condition , :if_true , :if_false
end
end
end

View File

@ -62,7 +62,7 @@ module Typed
def on_if_statement statement
branch_type , condition , if_true , if_false = *statement
w = IfStatement.new()
w = Tree::IfStatement.new()
w.branch_type = branch_type
w.condition = process(condition)
w.if_true = process(if_true)