-
Notifications
You must be signed in to change notification settings - Fork 585
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
[C] Add more standard types from ISO C #4076
base: master
Are you sure you want to change the base?
Conversation
Did you intend to remove the types from C++? |
Yes. C++, etc, will inherit from the C syntax now instead, or at least that was the idea. It's why I removed the assertions that will no longer work with this change. I thought it would be better to just have these in one place since they're shared between a total of 4 syntax families related to C. |
The inheritance isn't set up. People just muse about how it should be. |
It isn't? I thought it was given that changes I made to C were also showing up in Objective-C, etc. |
Where are you getting Obj-C from? |
I have both the C++ and Objective-C packages from this repository overriding the builtin ones in my Sublime Text. I noted that anything new that I've been adding syntax highlighting for to C.sublime-syntax would also show up for C++, Objective-C, and Objective-C++ syntax languages. So that's why I thought it was being inherited. |
C is indeed the base syntax for C++, Objective-C and Objective-C++. They don't yet use inheritance but include common contexts from C to share contexts/rules. Even though patterns/contexts are implemented modified only in C, we still should add relevant assertions to all 4 syntax test files so we can be sure this kind of pattern sharing works or doesn't get broken by any future change. |
So then how do you update the tests for the other languages over time? I noticed a lot was previously shared but not necessarily up to date with the one it originally copied from. |
The update of tests is a manual copy & paste process, one of the reasons for possible inconsistency. More over C family syntax definitions and tests are rather a unsorted collection of arbritary contributors' changes. Thus entropy of a possibly initial structure of contexts and tests has grown over time. |
For this PR, I can just replace the removed tests with the new one from C if that helps. Given what you've told me, I think I will review the tests and try to rewrite them off the C one once I am finished with my whole set of revisions. |
This adds the types defined by stddef.h, wchar.h, and uchar.h. Some of these types were first defined by C++ but are now defined by C11 or C23 so we will defer to C instead now.
Ok. I've revised the syntax tests for the other shared languages. |
This adds the types defined by stddef.h, wchar.h, and uchar.h. Some of these types were first defined by C++ but are now defined by C11 or C23 so we will defer to C instead now.