Reworking if statement
Using 2 phase approach Flattening tbd
This commit is contained in:
14
lib/mom/if_statement.rb
Normal file
14
lib/mom/if_statement.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module Mom
|
||||
class IfStatement < Instruction
|
||||
attr_reader :condition , :if_true , :if_false
|
||||
|
||||
attr_accessor :hoisted
|
||||
|
||||
def initialize( cond , if_true , if_false = nil)
|
||||
@condition = cond
|
||||
@if_true = if_true
|
||||
@if_false = if_false
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user