removing exceptions
This commit is contained in:
@ -62,4 +62,8 @@ module Ast
|
||||
value
|
||||
end
|
||||
end
|
||||
class AssignmentExpression < Expression
|
||||
def compile frame , method
|
||||
end
|
||||
end
|
||||
end
|
@ -1,7 +1,8 @@
|
||||
module Ast
|
||||
class IfExpression < Expression
|
||||
# attr_reader :cond, :if_true, :if_false
|
||||
def compile context
|
||||
def compile frame , method
|
||||
return nil
|
||||
f = context.function
|
||||
# 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
|
||||
|
@ -1,7 +1,10 @@
|
||||
module Ast
|
||||
class OperatorExpression < Expression
|
||||
# attr_reader :operator, :left, :right
|
||||
def compile context
|
||||
def compile frame , method
|
||||
nil
|
||||
end
|
||||
def scratch
|
||||
into = context.function
|
||||
puts "compiling operator #{to_s}"
|
||||
r_val = right.compile(context)
|
||||
|
@ -1,7 +1,10 @@
|
||||
module Ast
|
||||
class ReturnExpression < Expression
|
||||
# attr_reader :expression
|
||||
def compile context
|
||||
def compile frame ,method
|
||||
nil
|
||||
end
|
||||
def sc
|
||||
into = context.function
|
||||
puts "compiling return expression #{expression}, now return in return_regsiter"
|
||||
expression_value = expression.compile(context)
|
||||
|
@ -1,7 +1,10 @@
|
||||
module Ast
|
||||
class WhileExpression < Expression
|
||||
# attr_reader :condition, :body
|
||||
def compile context
|
||||
def compile frame , method
|
||||
nil
|
||||
end
|
||||
def old
|
||||
into = context.function
|
||||
ret = into.new_block "while_end"
|
||||
while_block = into.new_block "while_start"
|
||||
|
Reference in New Issue
Block a user