Skip to content

Commit

Permalink
[JSON] Rename mapping separator scopes (#3270)
Browse files Browse the repository at this point in the history
Applies #3228
  • Loading branch information
deathaxe authored Mar 14, 2022
1 parent 512a4f3 commit 6538ac5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions JSON/JSON.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ contexts:
- meta_include_prototype: false
- include: inside-string
- match: ':'
scope: punctuation.separator.mapping.key-value.json
scope: punctuation.separator.key-value.json
push:
- match: ',|\s?(?=\})'
scope: invalid.illegal.expected-mapping-value.json
Expand All @@ -129,7 +129,7 @@ contexts:
- match: ''
set:
- match: ','
scope: punctuation.separator.mapping.pair.json
scope: punctuation.separator.sequence.json
pop: 1
- match: \s*(?=\})
pop: 1
Expand Down
12 changes: 6 additions & 6 deletions JSON/syntax_test_json.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
// ^^ meta.mapping.value.json meta.mapping.json

, ,
// <- punctuation.separator.mapping.pair.json
// <- punctuation.separator.sequence.json
//^ invalid.illegal.expected-mapping-key.json

"sep": {},
// ^ punctuation.separator.mapping.key-value.json
// ^ punctuation.separator.key-value.json

"array": [ /**/ ],
// ^^^^^^^^ meta.mapping.value.json meta.sequence.json
Expand All @@ -54,14 +54,14 @@
// ^ - invalid
// ^^^^^^^^^^ comment.line.double-slash.js
,
// ^ punctuation.separator.mapping.pair.json
// ^ punctuation.separator.sequence.json
"foo": "bar"
/* comment */
// ^ - invalid
// ^^^^^^^^^^^^^ comment.block.json
},
//^ punctuation.section.mapping.end.json
// ^ punctuation.separator.mapping.pair.json
// ^ punctuation.separator.sequence.json

"string": "string",
// ^ punctuation.definition.string.begin.json
Expand All @@ -80,7 +80,7 @@
"E": 20e10,
// ^^^^^ meta.number.float.decimal.json constant.numeric.value.json
//^^^ meta.mapping.key.json string.quoted.double.json
// ^ punctuation.separator.mapping.key-value.json - meta.mapping.key
// ^ punctuation.separator.key-value.json - meta.mapping.key

"escape": "\n",
// ^^ constant.character.escape.json
Expand All @@ -97,7 +97,7 @@

/**/: "test",
// ^ meta.mapping.json comment.block.json
// ^ punctuation.separator.mapping.key-value.json - comment
// ^ punctuation.separator.key-value.json - comment
// ^^^^^^ meta.mapping.value.json string.quoted.double.json

"array2":
Expand Down

0 comments on commit 6538ac5

Please sign in to comment.