302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
|
# File 'lib/ytl/macro.rb', line 302
def to_ruby(context)
arg = @parent.arguments
context.ret_code.last << "("
if @parent.is_fcall or @parent.is_vcall then
context.ret_code.last << @name.to_s
else
context = arg[2].to_ruby(context)
context.ret_code.last << ".#{@name}"
end
if arg[3] then
context.ret_code.last << "("
arg[3..-1].each do |ae|
context = ae.to_ruby(context)
context.ret_code.last << ", "
end
context.ret_code.last.chop!
context.ret_code.last.chop!
context.ret_code.last << ")"
end
if arg[1].is_a?(BlockTopNode) then
context.ret_code.last << " "
context.work_prefix.push "bl"
context = arg[1].to_ruby(context)
context.work_prefix.pop
end
context.ret_code.last << ")\n"
context
end
|