-
Notifications
You must be signed in to change notification settings - Fork 153
Add more scopes to the tree-sitter grammar #303
Conversation
@Ben3eeE Haven't had time to check this myself yet, but does this cause any false positives with C++ template expressions? E.g. |
@thomasjo Thanks for pointing that out. It's entirely possible that it will conflict with template expressions. I haven't tested this myself yet actually. Just editing through the web editor 🙂 I will take a look at this as soon as I can. Are there any other examples you can think of? |
@Ben3eeE Can't think of anything else right now, but I'll have a "quick" scan through the language specification later. Will let you know if I find anything exotic 😁 |
254b0ec
to
100dd66
Compare
@thomasjo After atom/atom#18382 is merged this PR as it is now will work and not conflict with template expressions. TextMate still scopes @maxbrunsfeld Do you think we should scope |
I think we shouldn't; that seems like a bug in the TextMate parser. I'd prefer to either leave them as unscoped, or scope them in a way that's similar to the |
I strongly agree with @maxbrunsfeld. That’s a bug in the TextMate grammar. |
Seems like we don't have any Thanks so much for taking a look at this PR @thomasjo it made us notice the bug in atom core and fix up the scopes more 💯 |
We have a bunch of opened issues from @chbk regarding |
Another agreement with @maxbrunsfeld. We shouldn't let old bugs with the TextMate grammars affect Tree-sitter. |
@maxbrunsfeld I took a look at the open issues we have here to see if I could improve further. Some of these parse incorrectly with tree-sitter. I didn't check if any of these are valid reports. Just blindly assuming that they are. From a slack chat with @thomasjo:
From open issues:
alignas(64) is parsed as a Issues we can solve that are also an issue in tree-sitter: |
ec76634
to
e1362f4
Compare
I think let's get this into today's hotfix as-is. We can circle back and fix the parsing issues that you mentioned in another pass. |
🚨 WIP 🚨
TODO:
Refs atom/atom#18347 (comment)
Depends on: atom/atom#18382
Fixes: #297
Fixes: #296
Fixes: #295
Fixes: #294
Fixes: #293
Fixes: #291
/cc: @maxbrunsfeld