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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Since commit tree-sitter/tree-sitter@252e2a4 of the tree-sitter cli, the generate subcommand gives a warning for our grammar (at least at f4236d4):
generate
Warning: rule char_lit is just a `seq` or `choice` rule with a single element. This is unnecessary.
It takes a bit of digging, but the culprit is here [1]:
const OCTAL_CHAR = seq("o", choice(seq(DIGIT, DIGIT, DIGIT), seq(DIGIT, DIGIT), seq(DIGIT)));
The last seq is seq(DIGIT), which does indeed have a single argument.
seq
seq(DIGIT)
I don't know if this is a serious issue, but perhaps it makes sense to remove the seq there.
[1] Thanks to clason and amaanq for getting to the bottom of this. Some more background can be found here.
The text was updated successfully, but these errors were encountered:
As a bit of a follow-up, I came across this text:
(char_lit) being marked as having an unnecessary seq is part of a token construct, and so the warning isn't necessary in this case.
here.
Not sure if that means the grammar is fine in its current state.
The seq in question does seem spurious to me though.
Sorry, something went wrong.
Apparently, the change to tree-sitter was reverted.
Might still be worth making the change at some point, but it doesn't seem like an urgent matter.
No branches or pull requests
Since commit tree-sitter/tree-sitter@252e2a4 of the tree-sitter cli, the
generate
subcommand gives a warning for our grammar (at least at f4236d4):It takes a bit of digging, but the culprit is here [1]:
The last
seq
isseq(DIGIT)
, which does indeed have a single argument.I don't know if this is a serious issue, but perhaps it makes sense to remove the
seq
there.[1] Thanks to clason and amaanq for getting to the bottom of this. Some more background can be found here.
The text was updated successfully, but these errors were encountered: