We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider:
myrule = "key" ~ ";" | "key-word" ~ ";" | "key-word-extra" ~ ";" ;
And set namechars = '-'.
This will happily parse "key" and "key-word" but not "key-word-extra", because nameguard requires that the token being matched is alphanumeric:
partial_match = ( token.isalnum() and token[0].isalpha() and self.is_name_char(self.current()) )
I think this check should allow namechars to appear in the token being matched too.
The text was updated successfully, but these errors were encountered:
I can understand the need, but not the example. PEG grammars should place longer options first:
myrule = (key-word-extra" | "key-word" | "key") ~ ";" ;
At any rate, for consistency the check should be:
partial_match = all(self.is_name_char(t) for t in token + self.current())
Sorry, something went wrong.
050bbb6
No branches or pull requests
Consider:
And set namechars = '-'.
This will happily parse "key" and "key-word" but not "key-word-extra", because nameguard requires that the token being matched is alphanumeric:
I think this check should allow namechars to appear in the token being matched too.
The text was updated successfully, but these errors were encountered: