-
Notifications
You must be signed in to change notification settings - Fork 61
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
Make entry rule explicit #68
Comments
Is there a case one would need to have rules defined above the |
No, it's just that I don't like the fact that the order of rules matters. It does not matter for the whole rest of the file, so it should not matter for the first rule as well. |
Alternative keyword: |
As I could imagine to have more than one entry rule I like |
Isn't that the same? Whatever entry rule is used by the parser will become the root node. |
With Chevrotain you can use any rule as an entry rule, but for the langium document we should have only one. That why
|
I don't like the fact that Xtext assumes the first rule to be the entry rule. I would prefer to make this explicit in Langium, e.g. with a keyword
main
orroot
. We could offer a code action that adds this keyword to the first rule to simplify migration from Xtext.The text was updated successfully, but these errors were encountered: