View raw

1 { 2 "version": "1.0.0", 3 "scopeName": "source.toml", 4 "uuid": "8b4e5008-c50d-11ea-a91b-54ee75aeeb97", 5 "information_for_contributors": [ 6 "Originally was maintained by aster (galaster@foxmail.com). This notice is only kept here for the record, please don't send e-mails about bugs and other issues." 7 ], 8 "patterns": [ 9 { 10 "include": "#commentDirective" 11 }, 12 { 13 "include": "#comment" 14 }, 15 { 16 "include": "#table" 17 }, 18 { 19 "include": "#entryBegin" 20 }, 21 { 22 "include": "#value" 23 } 24 ], 25 "repository": { 26 "comment": { 27 "captures": { 28 "1": { 29 "name": "comment.line.number-sign.toml" 30 }, 31 "2": { 32 "name": "punctuation.definition.comment.toml" 33 } 34 }, 35 "comment": "Comments", 36 "match": "\\s*((#).*)$" 37 }, 38 "commentDirective": { 39 "captures": { 40 "1": { 41 "name": "meta.preprocessor.toml" 42 }, 43 "2": { 44 "name": "punctuation.definition.meta.preprocessor.toml" 45 } 46 }, 47 "comment": "Comments", 48 "match": "\\s*((#):.*)$" 49 }, 50 "table": { 51 "patterns": [ 52 { 53 "name": "meta.table.toml", 54 "match": "^\\s*(\\[)\\s*((?:(?:(?:[A-Za-z0-9_+-]+)|(?:\"[^\"]+\")|(?:'[^']+'))\\s*\\.?\\s*)+)\\s*(\\])", 55 "captures": { 56 "1": { 57 "name": "punctuation.definition.table.toml" 58 }, 59 "2": { 60 "patterns": [ 61 { 62 "match": "(?:[A-Za-z0-9_+-]+)|(?:\"[^\"]+\")|(?:'[^']+')", 63 "name": "support.type.property-name.table.toml" 64 }, 65 { 66 "match": "\\.", 67 "name": "punctuation.separator.dot.toml" 68 } 69 ] 70 }, 71 "3": { 72 "name": "punctuation.definition.table.toml" 73 } 74 } 75 }, 76 { 77 "name": "meta.array.table.toml", 78 "match": "^\\s*(\\[\\[)\\s*((?:(?:(?:[A-Za-z0-9_+-]+)|(?:\"[^\"]+\")|(?:'[^']+'))\\s*\\.?\\s*)+)\\s*(\\]\\])", 79 "captures": { 80 "1": { 81 "name": "punctuation.definition.array.table.toml" 82 }, 83 "2": { 84 "patterns": [ 85 { 86 "match": "(?:[A-Za-z0-9_+-]+)|(?:\"[^\"]+\")|(?:'[^']+')", 87 "name": "support.type.property-name.array.toml" 88 }, 89 { 90 "match": "\\.", 91 "name": "punctuation.separator.dot.toml" 92 } 93 ] 94 }, 95 "3": { 96 "name": "punctuation.definition.array.table.toml" 97 } 98 } 99 }, 100 { 101 "begin": "(\\{)", 102 "end": "(\\})", 103 "name": "meta.table.inline.toml", 104 "beginCaptures": { 105 "1": { 106 "name": "punctuation.definition.table.inline.toml" 107 } 108 }, 109 "endCaptures": { 110 "1": { 111 "name": "punctuation.definition.table.inline.toml" 112 } 113 }, 114 "patterns": [ 115 { 116 "include": "#comment" 117 }, 118 { 119 "match": ",", 120 "name": "punctuation.separator.table.inline.toml" 121 }, 122 { 123 "include": "#entryBegin" 124 }, 125 { 126 "include": "#value" 127 } 128 ] 129 } 130 ] 131 }, 132 "entryBegin": { 133 "name": "meta.entry.toml", 134 "match": "\\s*((?:(?:(?:[A-Za-z0-9_+-]+)|(?:\"[^\"]+\")|(?:'[^']+'))\\s*\\.?\\s*)+)\\s*(=)", 135 "captures": { 136 "1": { 137 "patterns": [ 138 { 139 "match": "(?:[A-Za-z0-9_+-]+)|(?:\"[^\"]+\")|(?:'[^']+')", 140 "name": "support.type.property-name.toml" 141 }, 142 { 143 "match": "\\.", 144 "name": "punctuation.separator.dot.toml" 145 } 146 ] 147 }, 148 "2": { 149 "name": "punctuation.eq.toml" 150 } 151 } 152 }, 153 "value": { 154 "patterns": [ 155 { 156 "name": "string.quoted.triple.basic.block.toml", 157 "begin": "\"\"\"", 158 "end": "\"\"\"", 159 "patterns": [ 160 { 161 "match": "\\\\([btnfr\"\\\\\\n/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", 162 "name": "constant.character.escape.toml" 163 }, 164 { 165 "match": "\\\\[^btnfr/\"\\\\\\n]", 166 "name": "invalid.illegal.escape.toml" 167 } 168 ] 169 }, 170 { 171 "name": "string.quoted.single.basic.line.toml", 172 "begin": "\"", 173 "end": "\"", 174 "patterns": [ 175 { 176 "match": "\\\\([btnfr\"\\\\\\n/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})", 177 "name": "constant.character.escape.toml" 178 }, 179 { 180 "match": "\\\\[^btnfr/\"\\\\\\n]", 181 "name": "invalid.illegal.escape.toml" 182 } 183 ] 184 }, 185 { 186 "name": "string.quoted.triple.literal.block.toml", 187 "begin": "'''", 188 "end": "'''" 189 }, 190 { 191 "name": "string.quoted.single.literal.line.toml", 192 "begin": "'", 193 "end": "'" 194 }, 195 { 196 "captures": { 197 "1": { 198 "name": "constant.other.time.datetime.offset.toml" 199 } 200 }, 201 "match": "(?<!\\w)(\\d{4}\\-\\d{2}\\-\\d{2}[T| ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[\\+\\-]\\d{2}:\\d{2}))(?!\\w)" 202 }, 203 { 204 "captures": { 205 "1": { 206 "name": "constant.other.time.datetime.local.toml" 207 } 208 }, 209 "match": "(\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)" 210 }, 211 { 212 "name": "constant.other.time.date.toml", 213 "match": "\\d{4}\\-\\d{2}\\-\\d{2}" 214 }, 215 { 216 "name": "constant.other.time.time.toml", 217 "match": "\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?" 218 }, 219 { 220 "match": "(?<!\\w)(true|false)(?!\\w)", 221 "captures": { 222 "1": { 223 "name": "constant.language.boolean.toml" 224 } 225 } 226 }, 227 { 228 "match": "(?<!\\w)([\\+\\-]?(0|([1-9](([0-9]|_[0-9])+)?))(?:(?:\\.([0-9]+))?[eE][\\+\\-]?[1-9]_?[0-9]*|(?:\\.[0-9_]*)))(?!\\w)", 229 "captures": { 230 "1": { 231 "name": "constant.numeric.float.toml" 232 } 233 } 234 }, 235 { 236 "match": "(?<!\\w)((?:[\\+\\-]?(0|([1-9](([0-9]|_[0-9])+)?))))(?!\\w)", 237 "captures": { 238 "1": { 239 "name": "constant.numeric.integer.toml" 240 } 241 } 242 }, 243 { 244 "match": "(?<!\\w)([\\+\\-]?inf)(?!\\w)", 245 "captures": { 246 "1": { 247 "name": "constant.numeric.inf.toml" 248 } 249 } 250 }, 251 { 252 "match": "(?<!\\w)([\\+\\-]?nan)(?!\\w)", 253 "captures": { 254 "1": { 255 "name": "constant.numeric.nan.toml" 256 } 257 } 258 }, 259 { 260 "match": "(?<!\\w)((?:0x(([0-9a-fA-F](([0-9a-fA-F]|_[0-9a-fA-F])+)?))))(?!\\w)", 261 "captures": { 262 "1": { 263 "name": "constant.numeric.hex.toml" 264 } 265 } 266 }, 267 { 268 "match": "(?<!\\w)(0o[0-7](_?[0-7])*)(?!\\w)", 269 "captures": { 270 "1": { 271 "name": "constant.numeric.oct.toml" 272 } 273 } 274 }, 275 { 276 "match": "(?<!\\w)(0b[01](_?[01])*)(?!\\w)", 277 "captures": { 278 "1": { 279 "name": "constant.numeric.bin.toml" 280 } 281 } 282 }, 283 { 284 "name": "meta.array.toml", 285 "begin": "(?<!\\w)(\\[)\\s*", 286 "end": "\\s*(\\])(?!\\w)", 287 "beginCaptures": { 288 "1": { 289 "name": "punctuation.definition.array.toml" 290 } 291 }, 292 "endCaptures": { 293 "1": { 294 "name": "punctuation.definition.array.toml" 295 } 296 }, 297 "patterns": [ 298 { 299 "match": ",", 300 "name": "punctuation.separator.array.toml" 301 }, 302 { 303 "include": "#comment" 304 }, 305 { 306 "include": "#value" 307 } 308 ] 309 }, 310 { 311 "begin": "(\\{)", 312 "end": "(\\})", 313 "name": "meta.table.inline.toml", 314 "beginCaptures": { 315 "1": { 316 "name": "punctuation.definition.table.inline.toml" 317 } 318 }, 319 "endCaptures": { 320 "1": { 321 "name": "punctuation.definition.table.inline.toml" 322 } 323 }, 324 "patterns": [ 325 { 326 "include": "#comment" 327 }, 328 { 329 "match": ",", 330 "name": "punctuation.separator.table.inline.toml" 331 }, 332 { 333 "include": "#entryBegin" 334 }, 335 { 336 "include": "#value" 337 } 338 ] 339 } 340 ] 341 } 342 } 343 }