lua-users home
lua-l archive

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


On Wed, 5 Jun 2019 at 16:07, Matthew Wild <mwild1@gmail.com> wrote:
> The Lua grammar is not line-based. Usually these two statements would
> be written:
>
> ```
> local resource
> x = 5
> ```
>
> But Lua would also accept it as:
>
> ```
> local
> resource
> x
> =
> 5
> ```
>
> with the exact same semantics. Check luac -l if it helps.
>
> The proposal of how to handle 'resource' as a semi-keyword would
> change the meaning of this block of code, however it was written.
>
> Designing language syntax is not trivial :)
>

You are absolutely right. I am feeling really stupid now. Time to shut up.