lua-users home
lua-l archive

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

On Wed, Jul 29, 2015 at 3:26 PM, Coda Highland <> wrote:
> You could go the opposite direction, you know:
> local i --[[:integer]] = 0
> Ravi could parse the --[[: prelude and treat it as a type annotation,
> while Lua will simply ignore it. This is what some typed Javascript
> tools do.
> /s/ Adam

This seems great to me. Ravi (or others) can parse the clean way and
the commented way.

A filter could convert code in both directions, if needed.

If inline comments were a common way to do something like this,
perhaps a more terse inline comment (perhaps with special
restrictions, such as no nesting or it ends when when an = sign is
present, as you're suggesting) would make some sense.