|
| 1 | +{ |
| 2 | + "fileTypes": [ |
| 3 | + "json" |
| 4 | + ], |
| 5 | + "keyEquivalent": "^~J", |
| 6 | + "name": "JSON", |
| 7 | + "patterns": [ |
| 8 | + { |
| 9 | + "include": "#value" |
| 10 | + } |
| 11 | + ], |
| 12 | + "repository": { |
| 13 | + "array": { |
| 14 | + "begin": "\\[", |
| 15 | + "beginCaptures": { |
| 16 | + "0": { |
| 17 | + "name": "punctuation.definition.array.begin.json" |
| 18 | + } |
| 19 | + }, |
| 20 | + "end": "\\]", |
| 21 | + "endCaptures": { |
| 22 | + "0": { |
| 23 | + "name": "punctuation.definition.array.end.json" |
| 24 | + } |
| 25 | + }, |
| 26 | + "name": "meta.structure.array.json", |
| 27 | + "patterns": [ |
| 28 | + { |
| 29 | + "include": "#value" |
| 30 | + }, |
| 31 | + { |
| 32 | + "match": ",", |
| 33 | + "name": "punctuation.separator.array.json" |
| 34 | + }, |
| 35 | + { |
| 36 | + "match": "[^\\s\\]]", |
| 37 | + "name": "invalid.illegal.expected-array-separator.json" |
| 38 | + } |
| 39 | + ] |
| 40 | + }, |
| 41 | + "constant": { |
| 42 | + "match": "\\b(?:true|false|null)\\b", |
| 43 | + "name": "constant.language.json" |
| 44 | + }, |
| 45 | + "number": { |
| 46 | + "comment": "handles integer and decimal numbers", |
| 47 | + "match": "(?x: # turn on extended mode\n\t\t\t -? # an optional minus\n\t\t\t (?:\n\t\t\t 0 # a zero\n\t\t\t | # ...or...\n\t\t\t [1-9] # a 1-9 character\n\t\t\t \\d* # followed by zero or more digits\n\t\t\t )\n\t\t\t (?:\n\t\t\t (?:\n\t\t\t \\. # a period\n\t\t\t \\d+ # followed by one or more digits\n\t\t\t )?\n\t\t\t (?:\n\t\t\t [eE] # an e character\n\t\t\t [+-]? # followed by an option +/-\n\t\t\t \\d+ # followed by one or more digits\n\t\t\t )? # make exponent optional\n\t\t\t )? # make decimal portion optional\n\t\t\t )", |
| 48 | + "name": "constant.numeric.json" |
| 49 | + }, |
| 50 | + "object": { |
| 51 | + "begin": "\\{", |
| 52 | + "beginCaptures": { |
| 53 | + "0": { |
| 54 | + "name": "punctuation.definition.dictionary.begin.json" |
| 55 | + } |
| 56 | + }, |
| 57 | + "comment": "a JSON object", |
| 58 | + "end": "\\}", |
| 59 | + "endCaptures": { |
| 60 | + "0": { |
| 61 | + "name": "punctuation.definition.dictionary.end.json" |
| 62 | + } |
| 63 | + }, |
| 64 | + "name": "meta.structure.dictionary.json", |
| 65 | + "patterns": [ |
| 66 | + { |
| 67 | + "comment": "the JSON object key", |
| 68 | + "include": "#string" |
| 69 | + }, |
| 70 | + { |
| 71 | + "begin": ":", |
| 72 | + "beginCaptures": { |
| 73 | + "0": { |
| 74 | + "name": "punctuation.separator.dictionary.key-value.json" |
| 75 | + } |
| 76 | + }, |
| 77 | + "end": "(,)|(?=\\})", |
| 78 | + "endCaptures": { |
| 79 | + "1": { |
| 80 | + "name": "punctuation.separator.dictionary.pair.json" |
| 81 | + } |
| 82 | + }, |
| 83 | + "name": "meta.structure.dictionary.value.json", |
| 84 | + "patterns": [ |
| 85 | + { |
| 86 | + "comment": "the JSON object value", |
| 87 | + "include": "#value" |
| 88 | + }, |
| 89 | + { |
| 90 | + "match": "[^\\s,]", |
| 91 | + "name": "invalid.illegal.expected-dictionary-separator.json" |
| 92 | + } |
| 93 | + ] |
| 94 | + }, |
| 95 | + { |
| 96 | + "match": "[^\\s\\}]", |
| 97 | + "name": "invalid.illegal.expected-dictionary-separator.json" |
| 98 | + } |
| 99 | + ] |
| 100 | + }, |
| 101 | + "string": { |
| 102 | + "begin": "\"", |
| 103 | + "beginCaptures": { |
| 104 | + "0": { |
| 105 | + "name": "punctuation.definition.string.begin.json" |
| 106 | + } |
| 107 | + }, |
| 108 | + "end": "\"", |
| 109 | + "endCaptures": { |
| 110 | + "0": { |
| 111 | + "name": "punctuation.definition.string.end.json" |
| 112 | + } |
| 113 | + }, |
| 114 | + "name": "string.quoted.double.json", |
| 115 | + "patterns": [ |
| 116 | + { |
| 117 | + "match": "(?x: # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4} # and four hex digits\n )\n )", |
| 118 | + "name": "constant.character.escape.json" |
| 119 | + }, |
| 120 | + { |
| 121 | + "match": "\\\\.", |
| 122 | + "name": "invalid.illegal.unrecognized-string-escape.json" |
| 123 | + } |
| 124 | + ] |
| 125 | + }, |
| 126 | + "value": { |
| 127 | + "comment": "the 'value' diagram at http://json.org", |
| 128 | + "patterns": [ |
| 129 | + { |
| 130 | + "include": "#constant" |
| 131 | + }, |
| 132 | + { |
| 133 | + "include": "#number" |
| 134 | + }, |
| 135 | + { |
| 136 | + "include": "#string" |
| 137 | + }, |
| 138 | + { |
| 139 | + "include": "#array" |
| 140 | + }, |
| 141 | + { |
| 142 | + "include": "#object" |
| 143 | + } |
| 144 | + ] |
| 145 | + } |
| 146 | + }, |
| 147 | + "scopeName": "source.json" |
| 148 | +} |
0 commit comments