refactor if_statement
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user