-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
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
build: Make scanner.c build with clang #22
Conversation
`isascii` is a GCC extension, not present in clang.
The file scanner.c is generated by tree-sitter right? If so why modify the code? |
Ahh, so it's hand-written. Why is this needed? For performance? |
Oh, I didn't know it's auto-generated. In that case, I'm happy to apply the fix in tree-sitter. This change is needed for me to be able to build Helix (which pulls tree-sitter-d as a dependency) with clang as C compiler.
I had to patch tree-sitter-d with what I submitted here to make it build. |
No, scanner.c is not auto-generated-- parse.c is. |
The reason is hand-coded is partly for performance, but partly for simplicity -- some aspects of the D grammar are best done at lexing time -- trying to specify the lexing part of the grammar in tree-sitter itself would greatly explode the grammar, and complicate the rule set. D is already complex enough as it is. :-) |
One of the included changes is gdamore/tree-sitter-d#22 which fixes the build of Helix when using clang as `CC`.
One of the included changes is gdamore/tree-sitter-d#22 which fixes the build of Helix when using clang as `CC`.
One of the included changes is gdamore/tree-sitter-d#22 which fixes the build of Helix when using clang as `CC`.
One of the included changes is gdamore/tree-sitter-d#22 which fixes the build of Helix when using clang as `CC`.
One of the included changes is gdamore/tree-sitter-d#22 which fixes the build of Helix when using clang as `CC`.
One of the included changes is gdamore/tree-sitter-d#22 which fixes the build of Helix when using clang as `CC`.
isascii
is a GCC extension, not present in clang.