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

Rename scope punctuation.definition.numeric.base → constant.numeric.integer.base #2460

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions C#/C#.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1544,11 +1544,11 @@ contexts:
- match: (0[xX])[\h_]*\h
scope: constant.numeric.integer.hexadecimal.cs
captures:
1: punctuation.definition.numeric.base.cs
1: constant.numeric.integer.base.cs
- match: (0[bB])[01_]*[01]
scope: constant.numeric.integer.binary.cs
captures:
1: punctuation.definition.numeric.base.cs
1: constant.numeric.integer.base.cs
- match: '{{dec_digits}}(?:(?:(?:(\.){{dec_digits}}){{dec_exponent}}?|{{dec_exponent}})({{float_suffix}})?|({{float_suffix}}))'
scope: constant.numeric.float.decimal.cs
captures:
Expand Down
4 changes: 2 additions & 2 deletions C#/tests/syntax_test_C#7.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ void Main(string[] args) {
// https://github.com/dotnet/roslyn/pull/2950
int bin = 0b1001_1010_0001_0100;
/// ^^^^^^^^^^^^^^^^^^^^^ constant.numeric.integer.binary
/// ^^ punctuation.definition.numeric.base
/// ^^ constant.numeric.integer.base
int hex = 0x1b_a0_44_fe;
/// ^^^^^^^^^^^^^ constant.numeric.integer.hexadecimal
/// ^^ punctuation.definition.numeric.base
/// ^^ constant.numeric.integer.base
int dec = 33_554_432;
/// ^^^^^^^^^^ constant.numeric.integer.decimal
int weird = 1_2__3___4____5_____6______7_______8________9;
Expand Down
8 changes: 4 additions & 4 deletions C++/C++.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ contexts:

# hexadecimal float (C99)
- match: \b0[xX](?=[[:alnum:]_''.]+?[pP])
scope: punctuation.definition.numeric.base.c++
scope: constant.numeric.integer.base.c++
push:
- meta_include_prototype: false
- meta_scope: constant.numeric.float.hexadecimal.c++
Expand All @@ -198,7 +198,7 @@ contexts:

# binary integer
- match: \b0[bB]
scope: punctuation.definition.numeric.base.c++
scope: constant.numeric.integer.base.c++
push:
- meta_include_prototype: false
- meta_scope: constant.numeric.integer.binary.c++
Expand All @@ -207,14 +207,14 @@ contexts:
scope: invalid.illegal.numeric.digit.c++
# hexadecimal integer
- match: \b0[xX]
scope: punctuation.definition.numeric.base.c++
scope: constant.numeric.integer.base.c++
push:
- meta_include_prototype: false
- meta_scope: constant.numeric.integer.hexadecimal.c++
- include: hexadecimal-suffix
# octal integer
- match: \b0(?=[\d''])
scope: punctuation.definition.numeric.base.c++
scope: constant.numeric.integer.base.c++
push:
- meta_include_prototype: false
- meta_scope: constant.numeric.integer.octal.c++
Expand Down
6 changes: 3 additions & 3 deletions C++/C.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ contexts:
7: invalid.illegal.numeric.suffix.c
# hexadecimal float (C99)
- match: \b0[xX](?=[[:alnum:].]+?[pP])
scope: punctuation.definition.numeric.base.c
scope: constant.numeric.integer.base.c
push:
- meta_include_prototype: false
- meta_scope: constant.numeric.float.hexadecimal.c
Expand All @@ -216,14 +216,14 @@ contexts:

# hexadecimal integer
- match: \b0[xX]
scope: punctuation.definition.numeric.base.c
scope: constant.numeric.integer.base.c
push:
- meta_include_prototype: false
- meta_scope: constant.numeric.integer.hexadecimal.c
- include: hexadecimal-suffix
# octal integer
- match: \b0(?=\d)
scope: punctuation.definition.numeric.base.c
scope: constant.numeric.integer.base.c
push:
- meta_include_prototype: false
- meta_scope: constant.numeric.integer.octal.c
Expand Down
24 changes: 12 additions & 12 deletions C++/syntax_test_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,60 +685,60 @@ dec8 = 1'234_567'890s0f;

oct1 = 01234567;
/* ^^^^^^^^ constant.numeric.integer.octal */
/* ^ punctuation.definition.numeric.base */
/* ^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

oct2 = 01234567L;
/* ^^^^^^^^ constant.numeric.integer.octal */
/* ^ punctuation.definition.numeric.base */
/* ^ constant.numeric.integer.base */
/* ^ storage.type.numeric */
/* ^ punctuation.terminator - constant */

oct3 = 01234567LL;
/* ^^^^^^^^^^ constant.numeric.integer.octal */
/* ^ punctuation.definition.numeric.base */
/* ^ constant.numeric.integer.base */
/* ^^ storage.type.numeric */
/* ^ punctuation.terminator - constant */

oct4 = 01234567ulL;
/* ^^^^^^^^^^^ constant.numeric.integer.octal */
/* ^ punctuation.definition.numeric.base */
/* ^ constant.numeric.integer.base */
/* ^^^ storage.type.numeric */
/* ^ punctuation.terminator - constant */

oct2 = 01284967Z0L;
/* ^^^^^^^^^^^ constant.numeric.integer.octal */
/* ^ punctuation.definition.numeric.base */
/* ^ constant.numeric.integer.base */
/* ^ invalid.illegal.numeric.digit */
/* ^ invalid.illegal.numeric.digit */
/* ^^^ invalid.illegal.numeric.suffix */
/* ^ punctuation.terminator - constant */

hex1 = 0x0+0xFL+0xaull+0xallu+0xfu+0x'f'12_4uz;
/* ^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ storage.type.numeric */
/* ^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^ storage.type.numeric */
/* ^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^ storage.type.numeric */
/* ^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ storage.type.numeric */
/* ^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^ string.quoted.single */
/* ^^^^^^ constant.numeric.integer.decimal */
/* ^^^^ invalid.illegal.numeric.suffix */
/* ^ punctuation.terminator - constant */

hex2 = 0xc1.01AbFp-1;
/* ^^^^^^^^^^^^^ constant.numeric.float.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.separator.decimal */
/* ^ punctuation.terminator - constant */

Expand Down
32 changes: 16 additions & 16 deletions C++/syntax_test_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,74 +1026,74 @@ dec5 = 2'354'202'076LL;

oct1 = 0123_567;
/* ^^^^^^^^ constant.numeric.integer.octal */
/* ^ punctuation.definition.numeric.base */
/* ^ constant.numeric.integer.base */
/* ^^^^ storage.type.numeric */
/* ^ punctuation.terminator - constant */

oct2 = 014'70;
/* ^^^^^^ constant.numeric.integer.octal */
/* ^ punctuation.definition.numeric.base */
/* ^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

hex1 = 0x1234567890ABCDEF;
/* ^^^^^^^^^^^^^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

hex2 = 0X1234567890ABCDEF;
/* ^^^^^^^^^^^^^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

hex3 = 0x1234567890abcdef;
/* ^^^^^^^^^^^^^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

hex4 = 0xA7'45'8C'38;
/* ^^^^^^^^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

hex5 = 0x0+0xFL+0xaull+0xallu+0xfu+0xf'12_4_uz;
/* ^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ storage.type.numeric */
/* ^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^ storage.type.numeric */
/* ^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^ storage.type.numeric */
/* ^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ storage.type.numeric */
/* ^^^^^^^^^^ constant.numeric.integer.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^^^^^ storage.type.numeric */
/* ^ punctuation.terminator - constant */

hex2 = 0xc1.01AbFp-1;
/* ^^^^^^^^^^^^^ constant.numeric.float.hexadecimal */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.separator.decimal */
/* ^ punctuation.terminator - constant */

bin1 = 0b010110;
/* ^^^^^^^^ constant.numeric.integer.binary */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

bin2 = 0B010010;
/* ^^^^^^^^ constant.numeric.integer.binary */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

bin3 = 0b1001'1101'0010'1100;
/* ^^^^^^^^^^^^^^^^^^^^^ constant.numeric.integer.binary */
/* ^^ punctuation.definition.numeric.base */
/* ^^ constant.numeric.integer.base */
/* ^ punctuation.terminator - constant */

f = 1.1+1.1e1+1.1e-1+1.1f+1.1e1f+1.1e-1f+1.1L+1.1e1L+1.1e-1L;
Expand Down
8 changes: 4 additions & 4 deletions Clojure/Clojure.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ contexts:
scope: constant.numeric.integer.hexadecimal.clojure
captures:
1: punctuation.definition.numeric.sign.clojure
2: punctuation.definition.numeric.base.clojure
2: constant.numeric.integer.base.clojure
3: storage.type.numeric.clojure
- match: '{{other_integer}}'
scope: constant.numeric.integer.other.clojure
captures:
1: punctuation.definition.numeric.sign.clojure
2: punctuation.definition.numeric.base.clojure
2: constant.numeric.integer.base.clojure
- match: '{{rational}}'
scope: constant.numeric.rational.decimal.clojure
captures:
Expand Down Expand Up @@ -160,14 +160,14 @@ contexts:
scope: constant.numeric.integer.hexadecimal.clojure
captures:
1: punctuation.definition.numeric.sign.clojure
2: punctuation.definition.numeric.base.clojure
2: constant.numeric.integer.base.clojure
3: storage.type.numeric.clojure
pop: true
- match: '{{other_integer}}'
scope: constant.numeric.integer.other.clojure
captures:
1: punctuation.definition.numeric.sign.clojure
2: punctuation.definition.numeric.base.clojure
2: constant.numeric.integer.base.clojure
pop: true
- match: '{{rational}}'
scope: constant.numeric.rational.decimal.clojure
Expand Down
Loading