ISPC grammar for tree-sitter language parser #2527
Replies: 2 comments 12 replies
-
Thanks for this contribution! Looking at the repo, I see that you have some tests, but they are not fully covering the language. It's probably ok, but i would suggest specifically covering floating point literals - we parse them differently as in C/C++. You can use these to tests for the examples of the literals that need to be parsed: float_literals.ispc and float_literals_value.ispc Also, I'm wondering what is the process for updating the grammar? I think we are not going to add anything new in the short term, but would be good to understand the process. |
Beta Was this translation helpful? Give feedback.
-
Hey @fab4100, it seems we've duplicated some effort here. My team (@ethandev) also completed a tree-sitter grammar about two weeks ago! hah! We are going to be using it in our LSP (Language Server Protocol) for better Intellisense like functionality in both vscode and Visual Studio. We chose to go with a TextMate grammar for syntax highlighting as that's what is used in vscode, and it's supported in Visual Studio. Those are our main two targets. But I'm not against using tree-sitter for syntax highlighting. What are your thoughts on the future maintenance of the ISPC grammar? Do you want to continue maintaining it and we'll use yours? Should we merge your work with ours and maintain it as part of the ISPC repo and maintain it from there? |
Beta Was this translation helpful? Give feedback.
-
Dear All,
I have written some grammar for an ISPC language parser in tree-sitter. The grammar and parser source can be found in https://github.com/fab4100/tree-sitter-ispc.
The parser and various queries are now also integrated in nvim-treesitter.
Beta Was this translation helpful? Give feedback.
All reactions