a start on conditionals
This commit is contained in:
@ -1,5 +1,19 @@
|
||||
module Vool
|
||||
class IfStatement < Statement
|
||||
attr_accessor :branch_type , :condition , :if_true , :if_false
|
||||
attr_accessor :condition , :if_true , :if_false
|
||||
|
||||
def initialize( cond = nil)
|
||||
@condition = cond
|
||||
@if_true = []
|
||||
@if_false = []
|
||||
end
|
||||
|
||||
def has_false?
|
||||
@if_false != nil
|
||||
end
|
||||
|
||||
def has_true?
|
||||
@if_true != nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user