-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub label scopes #38
Comments
Should we scope labels (hence variable assignments) to a "block" (macro/rept/… - maybe just like with Above code slightly would change:
|
Except then macros could no longer define labels, which may be something you want. |
Defining (global) labels in macros will break the macro scoping anyway right? Other could you maybe write a small example/test? |
No you can do
|
Thanks for providing some sample! Shouldn't this example produce a Writing this slightly different helps with quite some issues:
|
Macros and rept statements introduce a temporary lastLabel and then restores the previous one.
This allows for local labels within those scopes only.
But it fails if you try to nest macros/repts.
We should use a stack of labels instead of the single lastLabel, and search up the stack
so we can support this.
The text was updated successfully, but these errors were encountered: