[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) GOTO
- From: "Michael Rose" <michael.h.rose@...>
- Date: Thu, 16 Jun 2011 09:54:19 +0200 (CEST)
Von: "David Manura" <firstname.lastname@example.org>
Gesendet: 16.06.2011 03:22:41
An: "Lua mailing list" <email@example.com>
Betreff: Re: [ANN] Lua 5.2.0 (beta-rc1) GOTO
>On Wed, Jun 15, 2011 at 6:25 AM, Michael Rose <firstname.lastname@example.org> wrote:
>Do you allow this?
> @ 123 f()
> @ 124 g()
> @ 123 h()
Yes, why not?
But in the current implementation the space between '@' and the linenumber is forbidden.
The linenumber correction has nothing to do with goto labels. Goto labels should be unique, but
compiler generated lines can be mapped arbitraryly to original source line numbers.
A possible generalization (not a big deal) as suggested in other e-mails would be
@123 "orig.lua" or
@ 123 "orig.lua" or even
In contrast, labels shouldn't have embedded spaces and quote marks (") to be
distinguishable from line corrections:
@my-special-[goto]-label(123)> (no space, no ("), printable characters)
Of course users should stick to labels like
but as I already said previously, its handy to have more complex labels for
compiler generated ones just to help inspecting generated code.
>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.)
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar