lua-users home
lua-l archive

Re: Ambiguous syntax

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> There's no honest ambiguity in the syntax -- it's just a question of
> protecting against likely bugs.
> 
> f()
> (g or h)()
> 
> is naturally read as 2 statements, though given Lua's grammar it should be
> parsed as just one.
I think Lua's grammar allows that code to be read as two statements; it
is a very "honest" ambiguity.
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /