|
| 1 | +'fileTypes': [ |
| 2 | + 'json' |
| 3 | +] |
| 4 | +'name': 'JSON' |
| 5 | +'patterns': [ |
| 6 | + { |
| 7 | + 'include': '#value' |
| 8 | + } |
| 9 | +] |
| 10 | +'repository': |
| 11 | + 'array': |
| 12 | + 'begin': '\\[' |
| 13 | + 'beginCaptures': |
| 14 | + '0': |
| 15 | + 'name': 'punctuation.definition.array.begin.json' |
| 16 | + 'end': '\\]' |
| 17 | + 'endCaptures': |
| 18 | + '0': |
| 19 | + 'name': 'punctuation.definition.array.end.json' |
| 20 | + 'name': 'meta.structure.array.json' |
| 21 | + 'patterns': [ |
| 22 | + { |
| 23 | + 'include': '#value' |
| 24 | + } |
| 25 | + { |
| 26 | + 'match': ',' |
| 27 | + 'name': 'punctuation.separator.array.json' |
| 28 | + } |
| 29 | + { |
| 30 | + 'match': '[^\\s\\]]' |
| 31 | + 'name': 'invalid.illegal.expected-array-separator.json' |
| 32 | + } |
| 33 | + ] |
| 34 | + 'constant': |
| 35 | + 'match': '\\b(?:true|false|null)\\b' |
| 36 | + 'name': 'constant.language.json' |
| 37 | + 'number': |
| 38 | + 'comment': 'handles integer and decimal numbers' |
| 39 | + '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 )' |
| 40 | + 'name': 'constant.numeric.json' |
| 41 | + 'object': |
| 42 | + 'begin': '\\{' |
| 43 | + 'beginCaptures': |
| 44 | + '0': |
| 45 | + 'name': 'punctuation.definition.dictionary.begin.json' |
| 46 | + 'comment': 'a JSON object' |
| 47 | + 'end': '\\}' |
| 48 | + 'endCaptures': |
| 49 | + '0': |
| 50 | + 'name': 'punctuation.definition.dictionary.end.json' |
| 51 | + 'name': 'meta.structure.dictionary.json' |
| 52 | + 'patterns': [ |
| 53 | + { |
| 54 | + 'comment': 'the JSON object key' |
| 55 | + 'include': '#string' |
| 56 | + } |
| 57 | + { |
| 58 | + 'begin': ':' |
| 59 | + 'beginCaptures': |
| 60 | + '0': |
| 61 | + 'name': 'punctuation.separator.dictionary.key-value.json' |
| 62 | + 'end': '(,)|(?=\\})' |
| 63 | + 'endCaptures': |
| 64 | + '1': |
| 65 | + 'name': 'punctuation.separator.dictionary.pair.json' |
| 66 | + 'name': 'meta.structure.dictionary.value.json' |
| 67 | + 'patterns': [ |
| 68 | + { |
| 69 | + 'comment': 'the JSON object value' |
| 70 | + 'include': '#value' |
| 71 | + } |
| 72 | + { |
| 73 | + 'match': '[^\\s,]' |
| 74 | + 'name': 'invalid.illegal.expected-dictionary-separator.json' |
| 75 | + } |
| 76 | + ] |
| 77 | + } |
| 78 | + { |
| 79 | + 'match': '[^\\s\\}]' |
| 80 | + 'name': 'invalid.illegal.expected-dictionary-separator.json' |
| 81 | + } |
| 82 | + ] |
| 83 | + 'string': |
| 84 | + 'begin': '"' |
| 85 | + 'beginCaptures': |
| 86 | + '0': |
| 87 | + 'name': 'punctuation.definition.string.begin.json' |
| 88 | + 'end': '"' |
| 89 | + 'endCaptures': |
| 90 | + '0': |
| 91 | + 'name': 'punctuation.definition.string.end.json' |
| 92 | + 'name': 'string.quoted.double.json' |
| 93 | + 'patterns': [ |
| 94 | + { |
| 95 | + '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 )' |
| 96 | + 'name': 'constant.character.escape.json' |
| 97 | + } |
| 98 | + { |
| 99 | + 'match': '\\\\.' |
| 100 | + 'name': 'invalid.illegal.unrecognized-string-escape.json' |
| 101 | + } |
| 102 | + ] |
| 103 | + 'value': |
| 104 | + 'comment': 'the \'value\' diagram at http://json.org' |
| 105 | + 'patterns': [ |
| 106 | + { |
| 107 | + 'include': '#constant' |
| 108 | + } |
| 109 | + { |
| 110 | + 'include': '#number' |
| 111 | + } |
| 112 | + { |
| 113 | + 'include': '#string' |
| 114 | + } |
| 115 | + { |
| 116 | + 'include': '#array' |
| 117 | + } |
| 118 | + { |
| 119 | + 'include': '#object' |
| 120 | + } |
| 121 | + ] |
| 122 | +'scopeName': 'source.json' |
0 commit comments