lib/grumlin/translator.rb in grumlin-0.5.1 vs lib/grumlin/translator.rb in grumlin-0.6.0
- old
+ new
@@ -18,20 +18,24 @@
end
private
def arg_to_bytecode(arg)
+ return arg.to_bytecode if arg.is_a?(TypedValue)
return arg unless arg.is_a?(AnonymousStep)
args = arg.args.flatten.map do |a|
a.instance_of?(AnonymousStep) ? to_bytecode(a.steps) : arg_to_bytecode(a)
end
[arg.name, *args]
end
def arg_to_query_bytecode(arg)
return ["none"] if arg.nil?
+ return arg.to_bytecode if arg.is_a?(TypedValue)
return arg unless arg.is_a?(AnonymousStep)
+
+ # return arg.to_bytecode if arg.is_a?(TypedValue)
args = arg.args.flatten.map do |a|
a.instance_of?(AnonymousStep) ? Typing.to_bytecode(to_bytecode(a.steps)) : arg_to_query_bytecode(a)
end
[arg.name, *args]