On 4/17/10, Benoit Daloze <eregontp / gmail.com> wrote:
> I can understand easily operators can be confusing for the parser, but I
> didn't know ':' is an operator.

It's half of the "ternary operator":
  a ? b : c

It's also allowed as a substitute for 'then' in 1.8.

> And the easiest way to resolve the ambiguity variable/methods wouldn't be to
> look for '=' or '.' following a variable ?

I didn't understand this... there are plenty of cases where a variable
is allowed but doesn't have to be followed by '=' or '.'.

In principle, one could allow ':' as an "operator" only if a '?'
without matching ':' has been seen recently. In my judgment, this
would be too much additional complication in an area of the
parser/lexer that's already extremely squirelly.