How to limit array index and case number to be int terminal in grammar? #1704
-
Hi Langium community, I found that when I change the terminal NUMBER to INT_NUMBER. The grammar will show errors. Langium playground for grammar of using int number as index in array that shows error Langium playground for grammar of using float number as index in array that doesn't show error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I think that you probably have a decimal number rule that match |
Beta Was this translation helpful? Give feedback.
-
Hey @durianwaffle, The |
Beta Was this translation helpful? Give feedback.
You should just use a single number terminal. You can later perform validations in the appropriate places that the entered number is an integer (and not some
real
value).