clean and refactor

This commit is contained in:
Torsten Ruger
2017-01-16 17:44:34 +02:00
parent 091900ef1c
commit 7223ca9a1c
4 changed files with 15 additions and 7 deletions

View File

@ -32,7 +32,7 @@ module Melon
w = Vm::Tree::CallSite.new()
puts "receiver #{statement}"
w.name = name
w.arguments = process(args)
w.arguments = process(args) || []
w.receiver = process(receiver)
w
end

View File

@ -6,6 +6,9 @@ module Melon
def initialize(name , args_type , locals_type , source )
@name , @args_type , @locals_type , @source = name , args_type, locals_type , source
raise "Name must be symbol" unless name.is_a?(Symbol)
raise "args_type must be type" unless args_type.is_a?(Parfait::Type)
raise "locals_type must be type" unless locals_type.is_a?(Parfait::Type)
end
def normalize_source