-
Notifications
You must be signed in to change notification settings - Fork 588
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 digit separator like is already implemented for C++ #4101
base: master
Are you sure you want to change the base?
Conversation
C23 added this feature previously available in C++. This should close sublimehq#3972 as well as both C and C++ now have syntax support for the ' digit separator. This was implemented by just copying the digit variables from the C++ syntax file as it is the same construct in the end. The existing tests were updated to fix the part of the existing tests were broken by this new feature. Furthermore, some tests from C++ were adapted for C to add better testing for the new digit seperator. I also included tests for the newer base 2 integer contants. The C file did not have any tests for that yet.
c7c977a
to
2b6f6ee
Compare
I fixed the test issues with Objectice-C. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe following 2 meta.number
tests can be extended to be inline with the other assertions. Otherwise LGTM!
/* ^^^^^ constant.numeric.value.c */ | ||
/* ^^^^ invalid.illegal.numeric.suffix.c */ | ||
/* ^^^^^^ meta.number.integer.decimal.c */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to extend existing meta.number
test to cover whole constant.
/* ^^^^^ constant.numeric.value.c */ | |
/* ^^^^ invalid.illegal.numeric.suffix.c */ | |
/* ^^^^^^ meta.number.integer.decimal.c */ | |
/* ^^^^^^^^^^^^^^^^ meta.number.integer.decimal.c */ | |
/* ^^^^^ constant.numeric.value.c */ | |
/* ^^^^ invalid.illegal.numeric.suffix.c */ |
/* ^^^^^ constant.numeric.value.c */ | ||
/* ^^^^ invalid.illegal.numeric.suffix.c */ | ||
/* ^^^^^^ meta.number.integer.decimal.c */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
/* ^^^^^ constant.numeric.value.c */ | |
/* ^^^^ invalid.illegal.numeric.suffix.c */ | |
/* ^^^^^^ meta.number.integer.decimal.c */ | |
/* ^^^^^^^^^^^^^^^^ meta.number.integer.decimal.c */ | |
/* ^^^^^ constant.numeric.value.c */ | |
/* ^^^^ invalid.illegal.numeric.suffix.c */ |
C23 added this feature previously available in C++. This should close #3972 as well as both C and C++ now have syntax support for the ' digit separator.
This was implemented by just copying the digit variables from the C++ syntax file as it is the same construct in the end. The existing tests were updated to fix the part of the existing tests were broken by this new feature.
Furthermore, some tests from C++ were adapted for C to add better testing for the new digit seperator. I also included tests for the newer base 2 integer contants. The C file did not have any tests for that yet.