-
-
Notifications
You must be signed in to change notification settings - Fork 31
Fix syntax keyword command #79
base: master
Are you sure you want to change the base?
Conversation
7dd9e99 to
54e916a
Compare
| // Any ascii non-blanck printable character (no unicode) | ||
| _syn_keyword_identifier: ($) => | ||
| choice( | ||
| seq(/[!-~]/, repeat(token.immediate(/[!-~]/))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really weird, why not a simple regex ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it comes from a misunderstanding of priorities for me, but if I use a simple regex, the result is not the same as
regex has a lower priority. Adding manually a higher priority with prec(*) doesn't give the same result either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then that's pretty weird, because I thought regexes where there to lex things...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you find how to do it properly I would be glad to see it cause I have spent probably two hours trying to make it work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to find a way, but that worries me a litte.
| 'skipempty', | ||
| ), | ||
| token.immediate('['), | ||
| repeat(token.immediate(/[!-~]/)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above ?
Allow any non-blank printable character in keyword Fix keyword recognized as syntax_argument
85f8788 to
92f609f
Compare
|
Okay so the behavior here is really weird and I suspect that we missed something. |
Allow
and recognized
as
keywordinstead ofsyntax_argumentfollowed by the[]keyword