Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Conversation

@Fymyte
Copy link
Collaborator

@Fymyte Fymyte commented Feb 11, 2022

Allow

syn keyword synK key-word
syn keyword Type Maildir++

and recognized

syn keyword Type transparent[] conceal[] contained[] skipwhite[] skipnl[] skipempty[]

as keyword instead of syntax_argument followed by the [] keyword

@Fymyte Fymyte changed the title Allow - in syntax keyword keywords Fix syntax keyword command Feb 23, 2022
// Any ascii non-blanck printable character (no unicode)
_syn_keyword_identifier: ($) =>
choice(
seq(/[!-~]/, repeat(token.immediate(/[!-~]/))),
Copy link
Owner

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 ?

Copy link
Collaborator Author

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.

Copy link
Owner

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...

Copy link
Collaborator Author

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

Copy link
Owner

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(/[!-~]/)),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above ?

Fymyte added 2 commits August 18, 2022 11:37
Allow any non-blank printable character in keyword
Fix keyword recognized as syntax_argument
@vigoux
Copy link
Owner

vigoux commented Aug 18, 2022

Okay so the behavior here is really weird and I suspect that we missed something.
I am diving into the issue for a moment to see if I can find anything, but it seems that the parser generation is a little weird.

@vigoux vigoux added this to the v0.2.1 milestone Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants