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,8 +1,6 @@
require_relative "normalizer"
module Vool
class WhileStatement < Statement
include Normalizer
attr_reader :condition , :body , :hoisted
def initialize( condition , body , hoisted = nil)
@ -11,11 +9,6 @@ module Vool
@body = body
end
def normalize
cond , rest = *normalize_name(@condition)
WhileStatement.new(cond , @body.normalize , rest)
end
def to_mom( compiler )
merge_label = Mom::Label.new( "merge_label_#{object_id.to_s(16)}")
cond_label = Mom::Label.new( "cond_label_#{object_id.to_s(16)}")