Skip to content
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

Can't use a label for a block. #316

Closed
Kray-G opened this issue Aug 13, 2021 · 2 comments
Closed

Can't use a label for a block. #316

Kray-G opened this issue Aug 13, 2021 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Kray-G
Copy link
Owner

Kray-G commented Aug 13, 2021

A label for a block is not available with compile error.

var a = 10;
LABEL: {
Error: syntax error near the <(unknown)>:2
    a = 20;
    while (1) {
        break LABEL if (++a == 50);
    }
    a = 100;
}
System.println("a = %{a}"); // a = 50
@Kray-G Kray-G added the bug Something isn't working label Aug 13, 2021
@Kray-G Kray-G added this to the v1.1.0 milestone Aug 13, 2021
@Kray-G Kray-G self-assigned this Aug 13, 2021
@Kray-G
Copy link
Owner Author

Kray-G commented Aug 13, 2021

I got it's not possible to solve it with this style because of a syntax conflict.
I have to change the specification about this label style...

@Kray-G
Copy link
Owner Author

Kray-G commented Aug 13, 2021

I changed a specification for a label to be with two colons.
It's okay with 1 colon as well for a backward compatible, but a colon should be needed twice only for a block.

Kray-G added a commit that referenced this issue Aug 13, 2021
Kray-G added a commit that referenced this issue Aug 13, 2021
Kray-G added a commit that referenced this issue Aug 13, 2021
Kray-G added a commit that referenced this issue Aug 13, 2021
@Kray-G Kray-G closed this as completed in a0ea1d4 Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant