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

Cannot have statements followed by a class in a script #154

JSAbrahams opened this issue Aug 14, 2019 · 1 comment


Copy link

commented Aug 14, 2019

Description of Bug

The parser throws an error if we have a few statements followed by a class.

How to Reproduce

Write a script with a few statements followed by a class

Expected behaviour

We would expect the script to execute as usual
Namely, it should be possible to have a few statements followed by a class, i.e., write a script with some statements with for instance a helper class at the bottom.

@JSAbrahams JSAbrahams added this to the v0.2.0 milestone Aug 14, 2019

@JSAbrahams JSAbrahams added this to Needs triage in Fixing Language Bugs via automation Aug 14, 2019


This comment has been minimized.

Copy link
Owner Author

commented Aug 14, 2019

So this bug has been fixed in #151

However, a limitation of the current pipeline/parsing framework is that the order of classes and statements is not kept.
So in the output, all the classes are written first and then all the statements, meaning that the ordering of classes and statements is lost (though hiding statements between classes is bad practice anyway).

Not sure if this is a bad thing, but it is behaviour which should be kept in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.