remove the parse code and fix the rest to work with the gem (from git for now)
This commit is contained in:
@ -1,16 +1,6 @@
|
||||
module Ast
|
||||
class IfExpression < Expression
|
||||
attr_reader :cond, :if_true, :if_false
|
||||
def initialize cond, if_true, if_false
|
||||
@cond, @if_true, @if_false = cond, if_true, if_false
|
||||
end
|
||||
def inspect
|
||||
self.class.name + ".new(" + cond.inspect + ", "+
|
||||
if_true.inspect + "," + if_false.inspect + " )"
|
||||
end
|
||||
def attributes
|
||||
[:cond, :if_true, :if_false]
|
||||
end
|
||||
# attr_reader :cond, :if_true, :if_false
|
||||
def compile context , into
|
||||
# to execute the logic as the if states it, the blocks are the other way around
|
||||
# so we can the jump over the else if true ,and the else joins unconditionally after the true_block
|
||||
|
Reference in New Issue
Block a user