You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is inelegant, but I stronly believe that allowing dollar signs and their
variable name suffixes to both be first class citizens, is a bad idea.
The dollar sign should initiate a token that is exempt from any other
processing.
Note that it would be possible to construct a regex similar to the one for
IDENTIFIER, that only matches valid variable names. But it will be complex.
It seems more maintainable to just consume all allowed characters, and then
check validity with some simple golang in the parser actions.
Fixespurpleidea#728
ffrank
added a commit
to ffrank/mgmt
that referenced
this issue
Mar 12, 2024
This is inelegant, but I stronly believe that allowing dollar signs and their
variable name suffixes to both be first class citizens, is a bad idea.
The dollar sign should initiate a token that is exempt from any other
processing.
Note that it would be possible to construct a regex similar to the one for
IDENTIFIER, that only matches valid variable names. But it will be complex.
It seems more maintainable to just consume all allowed characters, and then
check validity with some simple golang in the parser actions.
Fixespurpleidea#728
I seem to have forgotten to add the following txtar test:
Woops---
In commit 233625d
It turns out I actually broke this. I didn't test properly, sorry!
Is it possible to have both? I don't think most languages allow this, but since we have a $ prefix, it should be easier to disambiguate things.
If so, fixup, if not, make that test failing and add the above test.
The text was updated successfully, but these errors were encountered: