remove function statements

functions need to be defined a level up
This commit is contained in:
Torsten Ruger
2016-12-17 18:28:42 +02:00
parent 4875d3aea7
commit ffb69a2c55
5 changed files with 2 additions and 60 deletions

View File

@ -1,7 +0,0 @@
module Typed
module Tree
class FunctionStatement < Statement
attr_accessor :return_type , :name , :parameters, :statements , :receiver
end
end
end

View File

@ -20,17 +20,6 @@ module Typed
w
end
def on_function statement
return_type , name , parameters, statements , receiver = *statement
w = Tree::FunctionStatement.new()
w.return_type = return_type
w.name = name.children.first
w.parameters = process parameters
w.statements = process(statements)
w.receiver = receiver
w
end
def on_parameters statement
params = {}
statement.children.each do |param , type , name|