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
I'm trying to add this to helix. But compilation fails with C2016:
D:\a\helix\helix\runtime\grammars\sources\templ\src\scanner.c(67): warning C4189: 'found': local variable is initialized but not referenced D:\a\helix\helix\runtime\grammars\sources\templ\src\scanner.c(93): error C2016: C requires that a struct or union have at least one member D:\a\helix\helix\runtime\grammars\sources\templ\src\scanner.c(341): warning C4244: 'function': conversion from 'int32_t' to 'wint_t', possible loss of data
Adding a dummy member seems to fix it:
diff --git a/src/scanner.c b/src/scanner.c index bde6561..efaa773 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -90,6 +90,7 @@ enum TokenType { }; typedef struct { + bool dummy; } Scanner; static unsigned serialize(Scanner *scanner, char *buffer) { return 0; }
But as I understand the scanner.c file is generated by tree-sitter?
scanner.c
The text was updated successfully, but these errors were encountered:
Yes the scanner is generated, I don't think I can do much about this.
You could try to use gcc with mingw ? I have no experience using treesitter on Windows unfortunately, I can't help you there.
Sorry, something went wrong.
Oh wait, is that true? Seems to me like the parser.c is generated, but scanner.c is updated by hand.
parser.c
You're right, my bad I remembered incorrectly.
Successfully merging a pull request may close this issue.
I'm trying to add this to helix.
But compilation fails with C2016:
Adding a dummy member seems to fix it:
But as I understand the
scanner.c
file is generated by tree-sitter?The text was updated successfully, but these errors were encountered: