I have a function with the following input structure:
f[{{a1, n1}, {a2, n2}...}, {i1, i2,...}]
The first argument is a List
of List
s, each with exactly two elements, and the second argument is a list of symbols.
So I thought the appropriate SyntaxInformation
to provide is
SyntaxInformation[f] = { "ArgumentsPattern" -> {{{_, _} ...}, {___}} };
Now let's look at some input examples (in v9.0.1)
In the first example, it is correctly able to indicate the missing argument. But in the second example, it is not highlighting the c
and h
in red (since these lists don't have exactly two arguments).
So, my guess is that SyntaxInformation
is unable to recognize patterns that are too deep. Is this correct? If not, what can be done to get the right syntax highlighting?