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/C++] digit separators #3972

Open
StreetwareGames opened this issue Apr 28, 2024 · 0 comments · May be fixed by #4101
Open

[C/C++] digit separators #3972

StreetwareGames opened this issue Apr 28, 2024 · 0 comments · May be fixed by #4101
Labels
C: Syntax T: feature major update for a syntax to support new language features

Comments

@StreetwareGames
Copy link

What happened?

the latest C standard introduced digit separators, i.e. int foo() { return 1'000'000; }.
Sublime text will highlight '000' as a string instead

@deathaxe deathaxe added T: feature major update for a syntax to support new language features C: Syntax labels Apr 29, 2024
braewoods pushed a commit to braewoods/Packages that referenced this issue Nov 24, 2024
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 pushed a commit to braewoods/Packages that referenced this issue Nov 24, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Syntax T: feature major update for a syntax to support new language features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants