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

compiler error: 'else' skips expected 'break' #2

Closed
JoeStrout opened this issue Jun 11, 2019 · 3 comments
Closed

compiler error: 'else' skips expected 'break' #2

JoeStrout opened this issue Jun 11, 2019 · 3 comments

Comments

@JoeStrout
Copy link
Owner

There seems to be a parsing issue when break appears inside an if block before an else or else if section. The compiler reports Compiler Error: 'else' skips expected 'break', which doesn't make much sense. Sample code (tested both in Try-It! and in command-line MiniScript):

for x in range(1,10)
    if x > 5 then
        print "A"
        break
    else
        print "B"
    end if
end for
print "Done"
@JoeStrout
Copy link
Owner Author

Also occurs in the C# version (tested with classic Unity demo).

JoeStrout added a commit that referenced this issue Jun 11, 2019
@JoeStrout
Copy link
Owner Author

Fixed.

@JoeStrout
Copy link
Owner Author

JoeStrout commented Jun 5, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant