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

Grammar without references generates invalid ast.js. #130

Closed
dslmeinte opened this issue Jun 24, 2021 · 1 comment · Fixed by #132
Closed

Grammar without references generates invalid ast.js. #130

dslmeinte opened this issue Jun 24, 2021 · 1 comment · Fixed by #132
Labels
bug Something isn't working cli CLI related issue
Milestone

Comments

@dslmeinte
Copy link

Langium version: 0.1.0
Package name: ?

Steps To Reproduce

  1. Make a grammar without references (...=[Person|ID]).
  2. Run langium:generate.

The current behavior

src/generated/ast.ts has a syntax error at export type <language name>AstReference = ;

The expected behavior

I guess never would work as RHS value if there are no references.

@dslmeinte dslmeinte added the bug Something isn't working label Jun 24, 2021
@spoenemann spoenemann added the cli CLI related issue label Jun 25, 2021
@msujew
Copy link
Contributor

msujew commented Jun 25, 2021

Thanks for your issue @dslmeinte. I think never is an appropriate type as well, especially since the generated getReferenceType method will always throw on any input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli CLI related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants