lua-users home
lua-l archive

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


On Wed, Jun 15, 2011 at 6:25 AM, Michael Rose <michael.h.rose@web.de> wrote:
> @123\n   The often missed line directive for compiler generated code.
>                The next line would be line number 123 of the original file.
>                A proposal to rearange compiler generated code with gotos to fit the
>                original line numbers is not feasible, because sometimes the same line number
>                can be used several times for subconstructs. This solution is also more clean IMHO.

Do you allow this?

  @ 123 f()
  @ 124 g()
  @ 123 h()

lua-5.2.0-beta-rc1 doesn't allow the following analogue because label
"line123" is redefined in the same scope:

  @ line123: f()
  @ line124: g()
  @ line123: h()

(However, there is no need for Lua to care about this conflict because
there is no goto targeting any of these labels.)