groonga/groonga — pull request #24 by kou (2012-08-10 05:20:07+00:00)
Title: Fix function detection with a completed argument

The current function object detection is very naive. It just looks the
Nth prior code. N is the number of arguments.

It works well for simple function call such as 'function(arg1, arg2)'
but doesn't work well for complex function call such as
'function(column == "value1" || column == "value2")'. The simple
function call has 2 codes for arguments. It's the same number as the
number of arguments. The comlex function call has 5 codes for
arguments. It's not the same number as the number of arguments.

This change computes the correct number of codes for arguments.