moved all the normalize stuff over to the ruby layer

Which is how it should have been from the start
This commit is contained in:
Torsten Ruger
2018-07-19 14:47:29 +03:00
parent 38350dd198
commit ae3d64eb53
15 changed files with 5 additions and 179 deletions

View File

@ -1,7 +1,6 @@
require_relative "normalizer"
module Vool
class IfStatement < Statement
include Normalizer
attr_reader :condition , :if_true , :if_false
@ -11,15 +10,6 @@ module Vool
@if_false = if_false
end
def normalize
cond , rest = *normalize_name(@condition)
fals = @if_false ? @if_false.normalize : nil
me = IfStatement.new(cond , @if_true.normalize, fals)
return me unless rest
rest << me
rest
end
def to_mom( compiler )
if_false ? full_if(compiler) : simple_if(compiler)
end