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

Generate checker functions for data type rules #990

Closed
spoenemann opened this issue Mar 13, 2023 · 0 comments · Fixed by #1003
Closed

Generate checker functions for data type rules #990

spoenemann opened this issue Mar 13, 2023 · 0 comments · Fixed by #1003
Assignees
Labels
cli CLI related issue

Comments

@spoenemann
Copy link
Contributor

It's easy to generate checker functions for rules that consist of an alternative of string literals. We might even consider extending this to terminal rules by using their corresponding regular expression, but it might be hard to check arbitrary data type rules (which can be composed of multiple lexer tokens).

Originally posted by @goto40 in #389 (comment)

Is there a function generated by the langium code generator to check the validity of a string concerning a given union type from the grammar? E.g., isState in the example above.

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

Successfully merging a pull request may close this issue.

2 participants