2015-09-20 15:30:07 +02:00
|
|
|
module Bosl
|
|
|
|
Compiler.class_eval do
|
|
|
|
|
|
|
|
def on_field_def expression
|
2015-09-27 15:06:48 +02:00
|
|
|
#puts expression.inspect
|
2015-09-20 15:30:07 +02:00
|
|
|
type , name , value = *expression
|
2015-09-27 11:59:26 +02:00
|
|
|
|
2015-10-05 23:27:13 +02:00
|
|
|
index = @method.ensure_local( name , type )
|
2015-09-20 15:30:07 +02:00
|
|
|
|
|
|
|
if value
|
|
|
|
value = process( value )
|
|
|
|
end
|
|
|
|
|
2015-09-27 15:06:48 +02:00
|
|
|
Virtual::Return.new( type , value )
|
2015-09-20 15:30:07 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|