lua-users home
lua-l archive

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

> If I were to create a variant of Lua where most of the differences were syntactic, I would use something along the lines of MoonScript [1] - instead of modifying the Lua compiler to compile your language, write a translator that translates your language into standard Lua, then just load it into Lua directly. This means (a) you don't have to muck about in the Lua core, and (b) you get full interoperability with the existing body of standard Lua code.

If Lua would support annotating out of the box so each line/token
could be mapped to another file for debugging purposes this would very
ease making DSLs that produce Lua code. Otherwise changing the parser
has the advantage that you show & debug the real sources instead of
some hybrid where all the line numbers and error messages are screwed