Skip to content
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

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

braewoods
Copy link
Contributor

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.

@braewoods
Copy link
Contributor Author

I fixed the test issues with Objectice-C.

Copy link
Collaborator

@deathaxe deathaxe left a 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!

C++/syntax_test_c.c Outdated Show resolved Hide resolved
Objective-C/syntax_test_objc.m Outdated Show resolved Hide resolved
James Buren and others added 2 commits December 8, 2024 08:16
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.
@braewoods
Copy link
Contributor Author

I rebased upon latest master.

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 8, 2024

FWIW, it is not necessary to always rebase unless there are conflicts.

@braewoods
Copy link
Contributor Author

I'm aware but I got into the habit because of the issues that can be caused from being behind.

@deathaxe deathaxe merged commit 52c3ca9 into sublimehq:master Dec 9, 2024
1 check passed
@braewoods braewoods deleted the c-digit-separator branch December 9, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C/C++] digit separators
3 participants