Parse nan and inf into numbers #1596
Unanswered
drhagenabm
asked this question in
Q&A
Replies: 1 comment
-
Hey @drhagenabm, the value conversion for terminals and data type rules happens in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Langium has the ability to parse strings into numbers so that not all attributes need to be strings. This also works on "NaN" and "Infinity". Is there a way to parse strings other than "NaN" and "Infinity" into numbers? I mean,
terminal NAN returns number: 'nan';
works for funny reasons, butterminal INFINITY returns number: 'inf';
does not.For example, this grammar parsers "inf" as
NaN
:Beta Was this translation helpful? Give feedback.
All reactions