remove the parse code and fix the rest to work with the gem (from git for now)

This commit is contained in:
Torsten Ruger
2014-06-04 22:03:45 +03:00
parent e9d2724f62
commit 7cc4c6344c
45 changed files with 33 additions and 1708 deletions

View File

@ -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