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
fmt.Errorf
%w
type
tree-sitter --version
tree-sitter 0.22.6 (b40f342067a89cd6331bf4c27407588320f3c263)
when parsing golang fmt.Errorf("failed to bla: %w", err) the parser reports that the format type is missing.
fmt.Errorf("failed to bla: %w", err)
From what I can tell this is caused by https://github.com/tree-sitter-grammars/tree-sitter-printf/blob/main/grammar.js#L45 the w in the size field.
w
size
Output:
(format_string [0, 0] - [0, 2] (format [0, 0] - [0, 2] (size [0, 1] - [0, 2]) (type [0, 2] - [0, 2]))) format.txt 0.06 ms 34 bytes/ms (MISSING type [0, 2] - [0, 2])
%w gets correctly parser as
(format_string [0, 0] - [0, 2] (format [0, 0] - [0, 2] (type [0, 1] - [0, 2])))
format.txt
tree-sitter parse format.txt
The text was updated successfully, but these errors were encountered:
I'm not sure how to fix this without breaking sizes. PR welcome.
Sorry, something went wrong.
i have no idea how to fix this either, in the meantime I am running a fork with w removed from size field
No branches or pull requests
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)tree-sitter 0.22.6 (b40f342067a89cd6331bf4c27407588320f3c263)
Describe the bug
when parsing golang
fmt.Errorf("failed to bla: %w", err)
the parser reports that the formattype
is missing.From what I can tell this is caused by https://github.com/tree-sitter-grammars/tree-sitter-printf/blob/main/grammar.js#L45 the
w
in thesize
field.Steps To Reproduce/Bad Parse Tree
%w
with printfOutput:
Expected Behavior/Parse Tree
%w
gets correctly parser asRepro
format.txt
:tree-sitter parse format.txt
The text was updated successfully, but these errors were encountered: