lua-users home
lua-l archive

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


On 05/09/2018 10:44 PM, Sean Conner wrote:
> It was thus said that the Great Lorenzo Donati once stated:
>> [...]
>> For example:
>>
>> end for         (ambiguous)
>> vs.
>> end for;
>> vs.
>> end ---for      (semantic comments?)
>> vs.
>> end ::for::     (fake label? ambiguous)
>> vs.
>> <choose your poison!>
>
>   Here are some other options:
>
>   function() ... endfunction
>   if ... then ... endif
>   while ... do ... endwhile
>   for ... do ... endfor
>   do ... enddo -- hmm ...
>
> Okay ...
>
>   function() ... noitcnuf
>   if ... then ... fi
>   while ... do ... elihw
>   for ... do ... rof
>   do ... od --- hmm ...
>

You can use [lua_code_formatter](search at github) as
transpiler for such stuff.

Just change input grammar for "function" definition and
"if", "for", "while", "do" constructs. Alternatively you
can modify it to produce "end  -- function" instead "end".

So this wishes may easily be implemented.

I don't think they have long-term perspectives. But it
may be fun to create private fork of language with
personal tweaks.

-- Martin