lua-users home
lua-l archive

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


> So how about more constrained version I suggested before, i.e. leave
> prefixexp in but extend it so that it can contain also literal
> constant?
> 
>  - prefixexp ::= var | functioncall | ‘(’ exp ‘)’
> + prefixexp ::= var | functioncall | ‘(’ exp ‘)’ | String

It has exactly the same problem:

  a = "hellooo"
  (print or io.write)(a)

Moreover, it is too ad-hoc. We justify parentheses as the only
exception because everything else fits inside them. But to allow
parentheses plus strings, because that is what happens to be useful
right now, is not a good argument.

-- Roberto