fix and test vool return statement
This commit is contained in:
@ -99,9 +99,8 @@ module Vool
|
||||
end
|
||||
|
||||
def on_return statement
|
||||
w = ReturnStatement.new()
|
||||
w.return_value = process(statement.children.first)
|
||||
w
|
||||
return_value = process(statement.children.first)
|
||||
ReturnStatement.new( return_value )
|
||||
end
|
||||
|
||||
def on_function statement
|
||||
|
@ -1,5 +1,9 @@
|
||||
module Vool
|
||||
class ReturnStatement < Statement
|
||||
attr_accessor :return_value
|
||||
|
||||
def initialize(value)
|
||||
@return_value = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user