| 1 |
{ |
| 2 |
"comment": "The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp", |
| 3 |
"fileTypes": ["erl", "escript", "hrl", "xrl", "yrl"], |
| 4 |
"keyEquivalent": "^~E", |
| 5 |
"name": "erlang", |
| 6 |
"patterns": [ |
| 7 |
{ |
| 8 |
"include": "#module-directive" |
| 9 |
}, |
| 10 |
{ |
| 11 |
"include": "#import-export-directive" |
| 12 |
}, |
| 13 |
{ |
| 14 |
"include": "#behaviour-directive" |
| 15 |
}, |
| 16 |
{ |
| 17 |
"include": "#record-directive" |
| 18 |
}, |
| 19 |
{ |
| 20 |
"include": "#define-directive" |
| 21 |
}, |
| 22 |
{ |
| 23 |
"include": "#macro-directive" |
| 24 |
}, |
| 25 |
{ |
| 26 |
"include": "#directive" |
| 27 |
}, |
| 28 |
{ |
| 29 |
"include": "#function" |
| 30 |
}, |
| 31 |
{ |
| 32 |
"include": "#everything-else" |
| 33 |
} |
| 34 |
], |
| 35 |
"repository": { |
| 36 |
"atom": { |
| 37 |
"patterns": [ |
| 38 |
{ |
| 39 |
"begin": "(')", |
| 40 |
"beginCaptures": { |
| 41 |
"1": { |
| 42 |
"name": "punctuation.definition.symbol.begin.erlang" |
| 43 |
} |
| 44 |
}, |
| 45 |
"end": "(')", |
| 46 |
"endCaptures": { |
| 47 |
"1": { |
| 48 |
"name": "punctuation.definition.symbol.end.erlang" |
| 49 |
} |
| 50 |
}, |
| 51 |
"name": "constant.other.symbol.quoted.single.erlang", |
| 52 |
"patterns": [ |
| 53 |
{ |
| 54 |
"captures": { |
| 55 |
"1": { |
| 56 |
"name": "punctuation.definition.escape.erlang" |
| 57 |
}, |
| 58 |
"3": { |
| 59 |
"name": "punctuation.definition.escape.erlang" |
| 60 |
} |
| 61 |
}, |
| 62 |
"match": "(\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2})", |
| 63 |
"name": "constant.other.symbol.escape.erlang" |
| 64 |
}, |
| 65 |
{ |
| 66 |
"match": "\\\\\\^?.?", |
| 67 |
"name": "invalid.illegal.atom.erlang" |
| 68 |
} |
| 69 |
] |
| 70 |
}, |
| 71 |
{ |
| 72 |
"match": "[a-z][a-zA-Z\\d@_]*+", |
| 73 |
"name": "constant.other.symbol.unquoted.erlang" |
| 74 |
} |
| 75 |
] |
| 76 |
}, |
| 77 |
"behaviour-directive": { |
| 78 |
"captures": { |
| 79 |
"1": { |
| 80 |
"name": "punctuation.section.directive.begin.erlang" |
| 81 |
}, |
| 82 |
"2": { |
| 83 |
"name": "keyword.control.directive.behaviour.erlang" |
| 84 |
}, |
| 85 |
"3": { |
| 86 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 87 |
}, |
| 88 |
"4": { |
| 89 |
"name": "entity.name.type.class.behaviour.definition.erlang" |
| 90 |
}, |
| 91 |
"5": { |
| 92 |
"name": "punctuation.definition.parameters.end.erlang" |
| 93 |
}, |
| 94 |
"6": { |
| 95 |
"name": "punctuation.section.directive.end.erlang" |
| 96 |
} |
| 97 |
}, |
| 98 |
"match": "^\\s*+(-)\\s*+(behaviour)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\))\\s*+(\\.)", |
| 99 |
"name": "meta.directive.behaviour.erlang" |
| 100 |
}, |
| 101 |
"binary": { |
| 102 |
"begin": "(<<)", |
| 103 |
"beginCaptures": { |
| 104 |
"1": { |
| 105 |
"name": "punctuation.definition.binary.begin.erlang" |
| 106 |
} |
| 107 |
}, |
| 108 |
"end": "(>>)", |
| 109 |
"endCaptures": { |
| 110 |
"1": { |
| 111 |
"name": "punctuation.definition.binary.end.erlang" |
| 112 |
} |
| 113 |
}, |
| 114 |
"name": "meta.structure.binary.erlang", |
| 115 |
"patterns": [ |
| 116 |
{ |
| 117 |
"captures": { |
| 118 |
"1": { |
| 119 |
"name": "punctuation.separator.binary.erlang" |
| 120 |
}, |
| 121 |
"2": { |
| 122 |
"name": "punctuation.separator.value-size.erlang" |
| 123 |
} |
| 124 |
}, |
| 125 |
"match": "(,)|(:)" |
| 126 |
}, |
| 127 |
{ |
| 128 |
"include": "#internal-type-specifiers" |
| 129 |
}, |
| 130 |
{ |
| 131 |
"include": "#everything-else" |
| 132 |
} |
| 133 |
] |
| 134 |
}, |
| 135 |
"character": { |
| 136 |
"patterns": [ |
| 137 |
{ |
| 138 |
"captures": { |
| 139 |
"1": { |
| 140 |
"name": "punctuation.definition.character.erlang" |
| 141 |
}, |
| 142 |
"2": { |
| 143 |
"name": "constant.character.escape.erlang" |
| 144 |
}, |
| 145 |
"3": { |
| 146 |
"name": "punctuation.definition.escape.erlang" |
| 147 |
}, |
| 148 |
"5": { |
| 149 |
"name": "punctuation.definition.escape.erlang" |
| 150 |
} |
| 151 |
}, |
| 152 |
"match": "(\\$)((\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2}))", |
| 153 |
"name": "constant.character.erlang" |
| 154 |
}, |
| 155 |
{ |
| 156 |
"match": "\\$\\\\\\^?.?", |
| 157 |
"name": "invalid.illegal.character.erlang" |
| 158 |
}, |
| 159 |
{ |
| 160 |
"captures": { |
| 161 |
"1": { |
| 162 |
"name": "punctuation.definition.character.erlang" |
| 163 |
} |
| 164 |
}, |
| 165 |
"match": "(\\$)[ \\S]", |
| 166 |
"name": "constant.character.erlang" |
| 167 |
}, |
| 168 |
{ |
| 169 |
"match": "\\$.?", |
| 170 |
"name": "invalid.illegal.character.erlang" |
| 171 |
} |
| 172 |
] |
| 173 |
}, |
| 174 |
"comment": { |
| 175 |
"begin": "(^[ \\t]+)?(?=%)", |
| 176 |
"beginCaptures": { |
| 177 |
"1": { |
| 178 |
"name": "punctuation.whitespace.comment.leading.erlang" |
| 179 |
} |
| 180 |
}, |
| 181 |
"end": "(?!\\G)", |
| 182 |
"patterns": [ |
| 183 |
{ |
| 184 |
"begin": "%", |
| 185 |
"beginCaptures": { |
| 186 |
"0": { |
| 187 |
"name": "punctuation.definition.comment.erlang" |
| 188 |
} |
| 189 |
}, |
| 190 |
"end": "\\n", |
| 191 |
"name": "comment.line.percentage.erlang" |
| 192 |
} |
| 193 |
] |
| 194 |
}, |
| 195 |
"define-directive": { |
| 196 |
"patterns": [ |
| 197 |
{ |
| 198 |
"begin": "^\\s*+(-)\\s*+(define)\\s*+(\\()\\s*+([a-zA-Z\\d@_]++)\\s*+", |
| 199 |
"beginCaptures": { |
| 200 |
"1": { |
| 201 |
"name": "punctuation.section.directive.begin.erlang" |
| 202 |
}, |
| 203 |
"2": { |
| 204 |
"name": "keyword.control.directive.define.erlang" |
| 205 |
}, |
| 206 |
"3": { |
| 207 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 208 |
}, |
| 209 |
"4": { |
| 210 |
"name": "entity.name.function.macro.definition.erlang" |
| 211 |
} |
| 212 |
}, |
| 213 |
"end": "(\\))\\s*+(\\.)", |
| 214 |
"endCaptures": { |
| 215 |
"1": { |
| 216 |
"name": "punctuation.definition.parameters.end.erlang" |
| 217 |
}, |
| 218 |
"2": { |
| 219 |
"name": "punctuation.section.directive.end.erlang" |
| 220 |
} |
| 221 |
}, |
| 222 |
"name": "meta.directive.define.erlang", |
| 223 |
"patterns": [ |
| 224 |
{ |
| 225 |
"include": "#everything-else" |
| 226 |
} |
| 227 |
] |
| 228 |
}, |
| 229 |
{ |
| 230 |
"begin": "(?=^\\s*+-\\s*+define\\s*+\\(\\s*+[a-zA-Z\\d@_]++\\s*+\\()", |
| 231 |
"end": "(\\))\\s*+(\\.)", |
| 232 |
"endCaptures": { |
| 233 |
"1": { |
| 234 |
"name": "punctuation.definition.parameters.end.erlang" |
| 235 |
}, |
| 236 |
"2": { |
| 237 |
"name": "punctuation.section.directive.end.erlang" |
| 238 |
} |
| 239 |
}, |
| 240 |
"name": "meta.directive.define.erlang", |
| 241 |
"patterns": [ |
| 242 |
{ |
| 243 |
"begin": "^\\s*+(-)\\s*+(define)\\s*+(\\()\\s*+([a-zA-Z\\d@_]++)\\s*+(\\()", |
| 244 |
"beginCaptures": { |
| 245 |
"1": { |
| 246 |
"name": "punctuation.section.directive.begin.erlang" |
| 247 |
}, |
| 248 |
"2": { |
| 249 |
"name": "keyword.control.directive.define.erlang" |
| 250 |
}, |
| 251 |
"3": { |
| 252 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 253 |
}, |
| 254 |
"4": { |
| 255 |
"name": "entity.name.function.macro.definition.erlang" |
| 256 |
}, |
| 257 |
"5": { |
| 258 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 259 |
} |
| 260 |
}, |
| 261 |
"end": "(\\))\\s*(,)", |
| 262 |
"endCaptures": { |
| 263 |
"1": { |
| 264 |
"name": "punctuation.definition.parameters.end.erlang" |
| 265 |
}, |
| 266 |
"2": { |
| 267 |
"name": "punctuation.separator.parameters.erlang" |
| 268 |
} |
| 269 |
}, |
| 270 |
"patterns": [ |
| 271 |
{ |
| 272 |
"match": ",", |
| 273 |
"name": "punctuation.separator.parameters.erlang" |
| 274 |
}, |
| 275 |
{ |
| 276 |
"include": "#everything-else" |
| 277 |
} |
| 278 |
] |
| 279 |
}, |
| 280 |
{ |
| 281 |
"match": "\\|\\||\\||:|;|,|\\.|->", |
| 282 |
"name": "punctuation.separator.define.erlang" |
| 283 |
}, |
| 284 |
{ |
| 285 |
"include": "#everything-else" |
| 286 |
} |
| 287 |
] |
| 288 |
} |
| 289 |
] |
| 290 |
}, |
| 291 |
"directive": { |
| 292 |
"patterns": [ |
| 293 |
{ |
| 294 |
"begin": "^\\s*+(-)\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\(?)", |
| 295 |
"beginCaptures": { |
| 296 |
"1": { |
| 297 |
"name": "punctuation.section.directive.begin.erlang" |
| 298 |
}, |
| 299 |
"2": { |
| 300 |
"name": "keyword.control.directive.erlang" |
| 301 |
}, |
| 302 |
"3": { |
| 303 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 304 |
} |
| 305 |
}, |
| 306 |
"end": "(\\)?)\\s*+(\\.)", |
| 307 |
"endCaptures": { |
| 308 |
"1": { |
| 309 |
"name": "punctuation.definition.parameters.end.erlang" |
| 310 |
}, |
| 311 |
"2": { |
| 312 |
"name": "punctuation.section.directive.end.erlang" |
| 313 |
} |
| 314 |
}, |
| 315 |
"name": "meta.directive.erlang", |
| 316 |
"patterns": [ |
| 317 |
{ |
| 318 |
"include": "#everything-else" |
| 319 |
} |
| 320 |
] |
| 321 |
}, |
| 322 |
{ |
| 323 |
"captures": { |
| 324 |
"1": { |
| 325 |
"name": "punctuation.section.directive.begin.erlang" |
| 326 |
}, |
| 327 |
"2": { |
| 328 |
"name": "keyword.control.directive.erlang" |
| 329 |
}, |
| 330 |
"3": { |
| 331 |
"name": "punctuation.section.directive.end.erlang" |
| 332 |
} |
| 333 |
}, |
| 334 |
"match": "^\\s*+(-)\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\.)", |
| 335 |
"name": "meta.directive.erlang" |
| 336 |
} |
| 337 |
] |
| 338 |
}, |
| 339 |
"everything-else": { |
| 340 |
"patterns": [ |
| 341 |
{ |
| 342 |
"include": "#comment" |
| 343 |
}, |
| 344 |
{ |
| 345 |
"include": "#record-usage" |
| 346 |
}, |
| 347 |
{ |
| 348 |
"include": "#macro-usage" |
| 349 |
}, |
| 350 |
{ |
| 351 |
"include": "#expression" |
| 352 |
}, |
| 353 |
{ |
| 354 |
"include": "#keyword" |
| 355 |
}, |
| 356 |
{ |
| 357 |
"include": "#textual-operator" |
| 358 |
}, |
| 359 |
{ |
| 360 |
"include": "#language-constant" |
| 361 |
}, |
| 362 |
{ |
| 363 |
"include": "#function-call" |
| 364 |
}, |
| 365 |
{ |
| 366 |
"include": "#tuple" |
| 367 |
}, |
| 368 |
{ |
| 369 |
"include": "#list" |
| 370 |
}, |
| 371 |
{ |
| 372 |
"include": "#binary" |
| 373 |
}, |
| 374 |
{ |
| 375 |
"include": "#parenthesized-expression" |
| 376 |
}, |
| 377 |
{ |
| 378 |
"include": "#character" |
| 379 |
}, |
| 380 |
{ |
| 381 |
"include": "#number" |
| 382 |
}, |
| 383 |
{ |
| 384 |
"include": "#atom" |
| 385 |
}, |
| 386 |
{ |
| 387 |
"include": "#string" |
| 388 |
}, |
| 389 |
{ |
| 390 |
"include": "#symbolic-operator" |
| 391 |
}, |
| 392 |
{ |
| 393 |
"include": "#variable" |
| 394 |
} |
| 395 |
] |
| 396 |
}, |
| 397 |
"expression": { |
| 398 |
"patterns": [ |
| 399 |
{ |
| 400 |
"begin": "\\b(if)\\b", |
| 401 |
"beginCaptures": { |
| 402 |
"1": { |
| 403 |
"name": "keyword.control.if.erlang" |
| 404 |
} |
| 405 |
}, |
| 406 |
"end": "\\b(end)\\b", |
| 407 |
"endCaptures": { |
| 408 |
"1": { |
| 409 |
"name": "keyword.control.end.erlang" |
| 410 |
} |
| 411 |
}, |
| 412 |
"name": "meta.expression.if.erlang", |
| 413 |
"patterns": [ |
| 414 |
{ |
| 415 |
"include": "#internal-expression-punctuation" |
| 416 |
}, |
| 417 |
{ |
| 418 |
"include": "#everything-else" |
| 419 |
} |
| 420 |
] |
| 421 |
}, |
| 422 |
{ |
| 423 |
"begin": "\\b(case)\\b", |
| 424 |
"beginCaptures": { |
| 425 |
"1": { |
| 426 |
"name": "keyword.control.case.erlang" |
| 427 |
} |
| 428 |
}, |
| 429 |
"end": "\\b(end)\\b", |
| 430 |
"endCaptures": { |
| 431 |
"1": { |
| 432 |
"name": "keyword.control.end.erlang" |
| 433 |
} |
| 434 |
}, |
| 435 |
"name": "meta.expression.case.erlang", |
| 436 |
"patterns": [ |
| 437 |
{ |
| 438 |
"include": "#internal-expression-punctuation" |
| 439 |
}, |
| 440 |
{ |
| 441 |
"include": "#everything-else" |
| 442 |
} |
| 443 |
] |
| 444 |
}, |
| 445 |
{ |
| 446 |
"begin": "\\b(receive)\\b", |
| 447 |
"beginCaptures": { |
| 448 |
"1": { |
| 449 |
"name": "keyword.control.receive.erlang" |
| 450 |
} |
| 451 |
}, |
| 452 |
"end": "\\b(end)\\b", |
| 453 |
"endCaptures": { |
| 454 |
"1": { |
| 455 |
"name": "keyword.control.end.erlang" |
| 456 |
} |
| 457 |
}, |
| 458 |
"name": "meta.expression.receive.erlang", |
| 459 |
"patterns": [ |
| 460 |
{ |
| 461 |
"include": "#internal-expression-punctuation" |
| 462 |
}, |
| 463 |
{ |
| 464 |
"include": "#everything-else" |
| 465 |
} |
| 466 |
] |
| 467 |
}, |
| 468 |
{ |
| 469 |
"captures": { |
| 470 |
"1": { |
| 471 |
"name": "keyword.control.fun.erlang" |
| 472 |
}, |
| 473 |
"4": { |
| 474 |
"name": "entity.name.type.class.module.erlang" |
| 475 |
}, |
| 476 |
"5": { |
| 477 |
"name": "variable.other.erlang" |
| 478 |
}, |
| 479 |
"6": { |
| 480 |
"name": "punctuation.separator.module-function.erlang" |
| 481 |
}, |
| 482 |
"8": { |
| 483 |
"name": "entity.name.function.erlang" |
| 484 |
}, |
| 485 |
"9": { |
| 486 |
"name": "variable.other.erlang" |
| 487 |
}, |
| 488 |
"10": { |
| 489 |
"name": "punctuation.separator.function-arity.erlang" |
| 490 |
} |
| 491 |
}, |
| 492 |
"comment": "Implicit function expression with optional module qualifier when both module and function can be atom or variable", |
| 493 |
"match": "\\b(fun)\\s+((([a-z][a-zA-Z\\d@_]*+)|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)\\s*+)?(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*(/)", |
| 494 |
"name": "meta.expression.fun.implicit.erlang" |
| 495 |
}, |
| 496 |
{ |
| 497 |
"begin": "\\b(fun)\\s+(([a-z][a-zA-Z\\d@_]*+)|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)", |
| 498 |
"beginCaptures": { |
| 499 |
"1": { |
| 500 |
"name": "keyword.control.fun.erlang" |
| 501 |
}, |
| 502 |
"3": { |
| 503 |
"name": "entity.name.type.class.module.erlang" |
| 504 |
}, |
| 505 |
"4": { |
| 506 |
"name": "variable.other.erlang" |
| 507 |
}, |
| 508 |
"5": { |
| 509 |
"name": "punctuation.separator.module-function.erlang" |
| 510 |
} |
| 511 |
}, |
| 512 |
"comment": "Implicit function expression with module qualifier when module can be atom or variable and function can by anything", |
| 513 |
"end": "(/)", |
| 514 |
"endCaptures": { |
| 515 |
"1": { |
| 516 |
"name": "punctuation.separator.function-arity.erlang" |
| 517 |
} |
| 518 |
}, |
| 519 |
"name": "meta.expression.fun.implicit.erlang", |
| 520 |
"patterns": [ |
| 521 |
{ |
| 522 |
"include": "#everything-else" |
| 523 |
} |
| 524 |
] |
| 525 |
}, |
| 526 |
{ |
| 527 |
"begin": "\\b(fun)\\s+(?!\\()", |
| 528 |
"beginCaptures": { |
| 529 |
"1": { |
| 530 |
"name": "keyword.control.fun.erlang" |
| 531 |
} |
| 532 |
}, |
| 533 |
"comment": "Implicit function expression when both module and function can by anything", |
| 534 |
"end": "(/)", |
| 535 |
"endCaptures": { |
| 536 |
"1": { |
| 537 |
"name": "punctuation.separator.function-arity.erlang" |
| 538 |
} |
| 539 |
}, |
| 540 |
"name": "meta.expression.fun.implicit.erlang", |
| 541 |
"patterns": [ |
| 542 |
{ |
| 543 |
"include": "#everything-else" |
| 544 |
} |
| 545 |
] |
| 546 |
}, |
| 547 |
{ |
| 548 |
"begin": "\\b(fun)\\s*+(\\()(?=(\\s*+\\())", |
| 549 |
"beginCaptures": { |
| 550 |
"1": { |
| 551 |
"name": "entity.name.function.erlang" |
| 552 |
}, |
| 553 |
"2": { |
| 554 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 555 |
} |
| 556 |
}, |
| 557 |
"comment": "Function type in type specification", |
| 558 |
"end": "(\\))", |
| 559 |
"endCaptures": { |
| 560 |
"1": { |
| 561 |
"name": "punctuation.definition.parameters.end.erlang" |
| 562 |
} |
| 563 |
}, |
| 564 |
"patterns": [ |
| 565 |
{ |
| 566 |
"include": "#everything-else" |
| 567 |
} |
| 568 |
] |
| 569 |
}, |
| 570 |
{ |
| 571 |
"begin": "\\b(fun)\\b", |
| 572 |
"beginCaptures": { |
| 573 |
"1": { |
| 574 |
"name": "keyword.control.fun.erlang" |
| 575 |
} |
| 576 |
}, |
| 577 |
"comment": "Explicit function expression", |
| 578 |
"end": "\\b(end)\\b", |
| 579 |
"endCaptures": { |
| 580 |
"1": { |
| 581 |
"name": "keyword.control.end.erlang" |
| 582 |
} |
| 583 |
}, |
| 584 |
"name": "meta.expression.fun.erlang", |
| 585 |
"patterns": [ |
| 586 |
{ |
| 587 |
"begin": "(?=\\()", |
| 588 |
"end": "(;)|(?=\\bend\\b)", |
| 589 |
"endCaptures": { |
| 590 |
"1": { |
| 591 |
"name": "punctuation.separator.clauses.erlang" |
| 592 |
} |
| 593 |
}, |
| 594 |
"patterns": [ |
| 595 |
{ |
| 596 |
"include": "#internal-function-parts" |
| 597 |
} |
| 598 |
] |
| 599 |
}, |
| 600 |
{ |
| 601 |
"include": "#everything-else" |
| 602 |
} |
| 603 |
] |
| 604 |
}, |
| 605 |
{ |
| 606 |
"begin": "\\b(try)\\b", |
| 607 |
"beginCaptures": { |
| 608 |
"1": { |
| 609 |
"name": "keyword.control.try.erlang" |
| 610 |
} |
| 611 |
}, |
| 612 |
"end": "\\b(end)\\b", |
| 613 |
"endCaptures": { |
| 614 |
"1": { |
| 615 |
"name": "keyword.control.end.erlang" |
| 616 |
} |
| 617 |
}, |
| 618 |
"name": "meta.expression.try.erlang", |
| 619 |
"patterns": [ |
| 620 |
{ |
| 621 |
"include": "#internal-expression-punctuation" |
| 622 |
}, |
| 623 |
{ |
| 624 |
"include": "#everything-else" |
| 625 |
} |
| 626 |
] |
| 627 |
}, |
| 628 |
{ |
| 629 |
"begin": "\\b(begin)\\b", |
| 630 |
"beginCaptures": { |
| 631 |
"1": { |
| 632 |
"name": "keyword.control.begin.erlang" |
| 633 |
} |
| 634 |
}, |
| 635 |
"end": "\\b(end)\\b", |
| 636 |
"endCaptures": { |
| 637 |
"1": { |
| 638 |
"name": "keyword.control.end.erlang" |
| 639 |
} |
| 640 |
}, |
| 641 |
"name": "meta.expression.begin.erlang", |
| 642 |
"patterns": [ |
| 643 |
{ |
| 644 |
"include": "#internal-expression-punctuation" |
| 645 |
}, |
| 646 |
{ |
| 647 |
"include": "#everything-else" |
| 648 |
} |
| 649 |
] |
| 650 |
}, |
| 651 |
{ |
| 652 |
"begin": "\\b(maybe)\\b", |
| 653 |
"beginCaptures": { |
| 654 |
"1": { |
| 655 |
"name": "keyword.control.maybe.erlang" |
| 656 |
} |
| 657 |
}, |
| 658 |
"end": "\\b(end)\\b", |
| 659 |
"endCaptures": { |
| 660 |
"1": { |
| 661 |
"name": "keyword.control.end.erlang" |
| 662 |
} |
| 663 |
}, |
| 664 |
"name": "meta.expression.maybe.erlang", |
| 665 |
"patterns": [ |
| 666 |
{ |
| 667 |
"include": "#internal-expression-punctuation" |
| 668 |
}, |
| 669 |
{ |
| 670 |
"include": "#everything-else" |
| 671 |
} |
| 672 |
] |
| 673 |
} |
| 674 |
] |
| 675 |
}, |
| 676 |
"function": { |
| 677 |
"begin": "^\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(?=\\()", |
| 678 |
"beginCaptures": { |
| 679 |
"1": { |
| 680 |
"name": "entity.name.function.definition.erlang" |
| 681 |
} |
| 682 |
}, |
| 683 |
"end": "(\\.)", |
| 684 |
"endCaptures": { |
| 685 |
"1": { |
| 686 |
"name": "punctuation.terminator.function.erlang" |
| 687 |
} |
| 688 |
}, |
| 689 |
"name": "meta.function.erlang", |
| 690 |
"patterns": [ |
| 691 |
{ |
| 692 |
"captures": { |
| 693 |
"1": { |
| 694 |
"name": "entity.name.function.erlang" |
| 695 |
} |
| 696 |
}, |
| 697 |
"match": "^\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(?=\\()" |
| 698 |
}, |
| 699 |
{ |
| 700 |
"begin": "(?=\\()", |
| 701 |
"end": "(;)|(?=\\.)", |
| 702 |
"endCaptures": { |
| 703 |
"1": { |
| 704 |
"name": "punctuation.separator.clauses.erlang" |
| 705 |
} |
| 706 |
}, |
| 707 |
"patterns": [ |
| 708 |
{ |
| 709 |
"include": "#parenthesized-expression" |
| 710 |
}, |
| 711 |
{ |
| 712 |
"include": "#internal-function-parts" |
| 713 |
} |
| 714 |
] |
| 715 |
}, |
| 716 |
{ |
| 717 |
"include": "#everything-else" |
| 718 |
} |
| 719 |
] |
| 720 |
}, |
| 721 |
"function-call": { |
| 722 |
"begin": "(?=([a-z][a-zA-Z\\d@_]*+|'[^']*+'|_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)\\s*+(\\(|:\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+'|_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)\\s*+\\())", |
| 723 |
"end": "(\\))", |
| 724 |
"endCaptures": { |
| 725 |
"1": { |
| 726 |
"name": "punctuation.definition.parameters.end.erlang" |
| 727 |
} |
| 728 |
}, |
| 729 |
"name": "meta.function-call.erlang", |
| 730 |
"patterns": [ |
| 731 |
{ |
| 732 |
"begin": "((erlang)\\s*+(:)\\s*+)?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)\\s*+(\\()", |
| 733 |
"beginCaptures": { |
| 734 |
"2": { |
| 735 |
"name": "entity.name.type.class.module.erlang" |
| 736 |
}, |
| 737 |
"3": { |
| 738 |
"name": "punctuation.separator.module-function.erlang" |
| 739 |
}, |
| 740 |
"4": { |
| 741 |
"name": "entity.name.function.guard.erlang" |
| 742 |
}, |
| 743 |
"5": { |
| 744 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 745 |
} |
| 746 |
}, |
| 747 |
"end": "(?=\\))", |
| 748 |
"patterns": [ |
| 749 |
{ |
| 750 |
"match": ",", |
| 751 |
"name": "punctuation.separator.parameters.erlang" |
| 752 |
}, |
| 753 |
{ |
| 754 |
"include": "#everything-else" |
| 755 |
} |
| 756 |
] |
| 757 |
}, |
| 758 |
{ |
| 759 |
"begin": "((([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(:)\\s*+)?(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+))\\s*+(\\()", |
| 760 |
"beginCaptures": { |
| 761 |
"3": { |
| 762 |
"name": "entity.name.type.class.module.erlang" |
| 763 |
}, |
| 764 |
"4": { |
| 765 |
"name": "variable.other.erlang" |
| 766 |
}, |
| 767 |
"5": { |
| 768 |
"name": "punctuation.separator.module-function.erlang" |
| 769 |
}, |
| 770 |
"7": { |
| 771 |
"name": "entity.name.function.erlang" |
| 772 |
}, |
| 773 |
"8": { |
| 774 |
"name": "variable.other.erlang" |
| 775 |
}, |
| 776 |
"9": { |
| 777 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 778 |
} |
| 779 |
}, |
| 780 |
"end": "(?=\\))", |
| 781 |
"patterns": [ |
| 782 |
{ |
| 783 |
"match": ",", |
| 784 |
"name": "punctuation.separator.parameters.erlang" |
| 785 |
}, |
| 786 |
{ |
| 787 |
"include": "#everything-else" |
| 788 |
} |
| 789 |
] |
| 790 |
} |
| 791 |
] |
| 792 |
}, |
| 793 |
"import-export-directive": { |
| 794 |
"patterns": [ |
| 795 |
{ |
| 796 |
"begin": "^\\s*+(-)\\s*+(import)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(,)", |
| 797 |
"beginCaptures": { |
| 798 |
"1": { |
| 799 |
"name": "punctuation.section.directive.begin.erlang" |
| 800 |
}, |
| 801 |
"2": { |
| 802 |
"name": "keyword.control.directive.import.erlang" |
| 803 |
}, |
| 804 |
"3": { |
| 805 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 806 |
}, |
| 807 |
"4": { |
| 808 |
"name": "entity.name.type.class.module.erlang" |
| 809 |
}, |
| 810 |
"5": { |
| 811 |
"name": "punctuation.separator.parameters.erlang" |
| 812 |
} |
| 813 |
}, |
| 814 |
"end": "(\\))\\s*+(\\.)", |
| 815 |
"endCaptures": { |
| 816 |
"1": { |
| 817 |
"name": "punctuation.definition.parameters.end.erlang" |
| 818 |
}, |
| 819 |
"2": { |
| 820 |
"name": "punctuation.section.directive.end.erlang" |
| 821 |
} |
| 822 |
}, |
| 823 |
"name": "meta.directive.import.erlang", |
| 824 |
"patterns": [ |
| 825 |
{ |
| 826 |
"include": "#internal-function-list" |
| 827 |
} |
| 828 |
] |
| 829 |
}, |
| 830 |
{ |
| 831 |
"begin": "^\\s*+(-)\\s*+(export)\\s*+(\\()", |
| 832 |
"beginCaptures": { |
| 833 |
"1": { |
| 834 |
"name": "punctuation.section.directive.begin.erlang" |
| 835 |
}, |
| 836 |
"2": { |
| 837 |
"name": "keyword.control.directive.export.erlang" |
| 838 |
}, |
| 839 |
"3": { |
| 840 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 841 |
} |
| 842 |
}, |
| 843 |
"end": "(\\))\\s*+(\\.)", |
| 844 |
"endCaptures": { |
| 845 |
"1": { |
| 846 |
"name": "punctuation.definition.parameters.end.erlang" |
| 847 |
}, |
| 848 |
"2": { |
| 849 |
"name": "punctuation.section.directive.end.erlang" |
| 850 |
} |
| 851 |
}, |
| 852 |
"name": "meta.directive.export.erlang", |
| 853 |
"patterns": [ |
| 854 |
{ |
| 855 |
"include": "#internal-function-list" |
| 856 |
} |
| 857 |
] |
| 858 |
} |
| 859 |
] |
| 860 |
}, |
| 861 |
"internal-expression-punctuation": { |
| 862 |
"captures": { |
| 863 |
"1": { |
| 864 |
"name": "punctuation.separator.clause-head-body.erlang" |
| 865 |
}, |
| 866 |
"2": { |
| 867 |
"name": "punctuation.separator.clauses.erlang" |
| 868 |
}, |
| 869 |
"3": { |
| 870 |
"name": "punctuation.separator.expressions.erlang" |
| 871 |
} |
| 872 |
}, |
| 873 |
"match": "(->)|(;)|(,)" |
| 874 |
}, |
| 875 |
"internal-function-list": { |
| 876 |
"begin": "(\\[)", |
| 877 |
"beginCaptures": { |
| 878 |
"1": { |
| 879 |
"name": "punctuation.definition.list.begin.erlang" |
| 880 |
} |
| 881 |
}, |
| 882 |
"end": "(\\])", |
| 883 |
"endCaptures": { |
| 884 |
"1": { |
| 885 |
"name": "punctuation.definition.list.end.erlang" |
| 886 |
} |
| 887 |
}, |
| 888 |
"name": "meta.structure.list.function.erlang", |
| 889 |
"patterns": [ |
| 890 |
{ |
| 891 |
"begin": "([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(/)", |
| 892 |
"beginCaptures": { |
| 893 |
"1": { |
| 894 |
"name": "entity.name.function.erlang" |
| 895 |
}, |
| 896 |
"2": { |
| 897 |
"name": "punctuation.separator.function-arity.erlang" |
| 898 |
} |
| 899 |
}, |
| 900 |
"end": "(,)|(?=\\])", |
| 901 |
"endCaptures": { |
| 902 |
"1": { |
| 903 |
"name": "punctuation.separator.list.erlang" |
| 904 |
} |
| 905 |
}, |
| 906 |
"patterns": [ |
| 907 |
{ |
| 908 |
"include": "#everything-else" |
| 909 |
} |
| 910 |
] |
| 911 |
}, |
| 912 |
{ |
| 913 |
"include": "#everything-else" |
| 914 |
} |
| 915 |
] |
| 916 |
}, |
| 917 |
"internal-function-parts": { |
| 918 |
"patterns": [ |
| 919 |
{ |
| 920 |
"begin": "(?=\\()", |
| 921 |
"end": "(->)", |
| 922 |
"endCaptures": { |
| 923 |
"1": { |
| 924 |
"name": "punctuation.separator.clause-head-body.erlang" |
| 925 |
} |
| 926 |
}, |
| 927 |
"patterns": [ |
| 928 |
{ |
| 929 |
"begin": "(\\()", |
| 930 |
"beginCaptures": { |
| 931 |
"1": { |
| 932 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 933 |
} |
| 934 |
}, |
| 935 |
"end": "(\\))", |
| 936 |
"endCaptures": { |
| 937 |
"1": { |
| 938 |
"name": "punctuation.definition.parameters.end.erlang" |
| 939 |
} |
| 940 |
}, |
| 941 |
"patterns": [ |
| 942 |
{ |
| 943 |
"match": ",", |
| 944 |
"name": "punctuation.separator.parameters.erlang" |
| 945 |
}, |
| 946 |
{ |
| 947 |
"include": "#everything-else" |
| 948 |
} |
| 949 |
] |
| 950 |
}, |
| 951 |
{ |
| 952 |
"match": ",|;", |
| 953 |
"name": "punctuation.separator.guards.erlang" |
| 954 |
}, |
| 955 |
{ |
| 956 |
"include": "#everything-else" |
| 957 |
} |
| 958 |
] |
| 959 |
}, |
| 960 |
{ |
| 961 |
"match": ",", |
| 962 |
"name": "punctuation.separator.expressions.erlang" |
| 963 |
}, |
| 964 |
{ |
| 965 |
"include": "#everything-else" |
| 966 |
} |
| 967 |
] |
| 968 |
}, |
| 969 |
"internal-record-body": { |
| 970 |
"begin": "(\\{)", |
| 971 |
"beginCaptures": { |
| 972 |
"1": { |
| 973 |
"name": "punctuation.definition.class.record.begin.erlang" |
| 974 |
} |
| 975 |
}, |
| 976 |
"end": "(\\})", |
| 977 |
"endCaptures": { |
| 978 |
"1": { |
| 979 |
"name": "punctuation.definition.class.record.end.erlang" |
| 980 |
} |
| 981 |
}, |
| 982 |
"name": "meta.structure.record.erlang", |
| 983 |
"patterns": [ |
| 984 |
{ |
| 985 |
"begin": "(([a-z][a-zA-Z\\d@_]*+|'[^']*+')|(_))", |
| 986 |
"beginCaptures": { |
| 987 |
"2": { |
| 988 |
"name": "variable.other.field.erlang" |
| 989 |
}, |
| 990 |
"3": { |
| 991 |
"name": "variable.language.omitted.field.erlang" |
| 992 |
} |
| 993 |
}, |
| 994 |
"end": "(,)|(?=\\})", |
| 995 |
"endCaptures": { |
| 996 |
"1": { |
| 997 |
"name": "punctuation.separator.class.record.erlang" |
| 998 |
} |
| 999 |
}, |
| 1000 |
"patterns": [ |
| 1001 |
{ |
| 1002 |
"include": "#everything-else" |
| 1003 |
} |
| 1004 |
] |
| 1005 |
}, |
| 1006 |
{ |
| 1007 |
"include": "#everything-else" |
| 1008 |
} |
| 1009 |
] |
| 1010 |
}, |
| 1011 |
"internal-type-specifiers": { |
| 1012 |
"begin": "(/)", |
| 1013 |
"beginCaptures": { |
| 1014 |
"1": { |
| 1015 |
"name": "punctuation.separator.value-type.erlang" |
| 1016 |
} |
| 1017 |
}, |
| 1018 |
"end": "(?=,|:|>>)", |
| 1019 |
"patterns": [ |
| 1020 |
{ |
| 1021 |
"captures": { |
| 1022 |
"1": { |
| 1023 |
"name": "storage.type.erlang" |
| 1024 |
}, |
| 1025 |
"2": { |
| 1026 |
"name": "storage.modifier.signedness.erlang" |
| 1027 |
}, |
| 1028 |
"3": { |
| 1029 |
"name": "storage.modifier.endianness.erlang" |
| 1030 |
}, |
| 1031 |
"4": { |
| 1032 |
"name": "storage.modifier.unit.erlang" |
| 1033 |
}, |
| 1034 |
"5": { |
| 1035 |
"name": "punctuation.separator.unit-specifiers.erlang" |
| 1036 |
}, |
| 1037 |
"6": { |
| 1038 |
"name": "constant.numeric.integer.decimal.erlang" |
| 1039 |
}, |
| 1040 |
"7": { |
| 1041 |
"name": "punctuation.separator.type-specifiers.erlang" |
| 1042 |
} |
| 1043 |
}, |
| 1044 |
"match": "(integer|float|binary|bytes|bitstring|bits|utf8|utf16|utf32)|(signed|unsigned)|(big|little|native)|(unit)(:)(\\d++)|(-)" |
| 1045 |
} |
| 1046 |
] |
| 1047 |
}, |
| 1048 |
"keyword": { |
| 1049 |
"match": "\\b(after|begin|case|catch|cond|end|fun|if|let|of|try|receive|when|maybe|else)\\b", |
| 1050 |
"name": "keyword.control.erlang" |
| 1051 |
}, |
| 1052 |
"language-constant": { |
| 1053 |
"match": "\\b(false|true|undefined)\\b", |
| 1054 |
"name": "constant.language" |
| 1055 |
}, |
| 1056 |
"list": { |
| 1057 |
"begin": "(\\[)", |
| 1058 |
"beginCaptures": { |
| 1059 |
"1": { |
| 1060 |
"name": "punctuation.definition.list.begin.erlang" |
| 1061 |
} |
| 1062 |
}, |
| 1063 |
"end": "(\\])", |
| 1064 |
"endCaptures": { |
| 1065 |
"1": { |
| 1066 |
"name": "punctuation.definition.list.end.erlang" |
| 1067 |
} |
| 1068 |
}, |
| 1069 |
"name": "meta.structure.list.erlang", |
| 1070 |
"patterns": [ |
| 1071 |
{ |
| 1072 |
"match": "\\||\\|\\||,", |
| 1073 |
"name": "punctuation.separator.list.erlang" |
| 1074 |
}, |
| 1075 |
{ |
| 1076 |
"include": "#everything-else" |
| 1077 |
} |
| 1078 |
] |
| 1079 |
}, |
| 1080 |
"macro-directive": { |
| 1081 |
"patterns": [ |
| 1082 |
{ |
| 1083 |
"captures": { |
| 1084 |
"1": { |
| 1085 |
"name": "punctuation.section.directive.begin.erlang" |
| 1086 |
}, |
| 1087 |
"2": { |
| 1088 |
"name": "keyword.control.directive.ifdef.erlang" |
| 1089 |
}, |
| 1090 |
"3": { |
| 1091 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 1092 |
}, |
| 1093 |
"4": { |
| 1094 |
"name": "entity.name.function.macro.erlang" |
| 1095 |
}, |
| 1096 |
"5": { |
| 1097 |
"name": "punctuation.definition.parameters.end.erlang" |
| 1098 |
}, |
| 1099 |
"6": { |
| 1100 |
"name": "punctuation.section.directive.end.erlang" |
| 1101 |
} |
| 1102 |
}, |
| 1103 |
"match": "^\\s*+(-)\\s*+(ifdef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)", |
| 1104 |
"name": "meta.directive.ifdef.erlang" |
| 1105 |
}, |
| 1106 |
{ |
| 1107 |
"captures": { |
| 1108 |
"1": { |
| 1109 |
"name": "punctuation.section.directive.begin.erlang" |
| 1110 |
}, |
| 1111 |
"2": { |
| 1112 |
"name": "keyword.control.directive.ifndef.erlang" |
| 1113 |
}, |
| 1114 |
"3": { |
| 1115 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 1116 |
}, |
| 1117 |
"4": { |
| 1118 |
"name": "entity.name.function.macro.erlang" |
| 1119 |
}, |
| 1120 |
"5": { |
| 1121 |
"name": "punctuation.definition.parameters.end.erlang" |
| 1122 |
}, |
| 1123 |
"6": { |
| 1124 |
"name": "punctuation.section.directive.end.erlang" |
| 1125 |
} |
| 1126 |
}, |
| 1127 |
"match": "^\\s*+(-)\\s*+(ifndef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)", |
| 1128 |
"name": "meta.directive.ifndef.erlang" |
| 1129 |
}, |
| 1130 |
{ |
| 1131 |
"captures": { |
| 1132 |
"1": { |
| 1133 |
"name": "punctuation.section.directive.begin.erlang" |
| 1134 |
}, |
| 1135 |
"2": { |
| 1136 |
"name": "keyword.control.directive.undef.erlang" |
| 1137 |
}, |
| 1138 |
"3": { |
| 1139 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 1140 |
}, |
| 1141 |
"4": { |
| 1142 |
"name": "entity.name.function.macro.erlang" |
| 1143 |
}, |
| 1144 |
"5": { |
| 1145 |
"name": "punctuation.definition.parameters.end.erlang" |
| 1146 |
}, |
| 1147 |
"6": { |
| 1148 |
"name": "punctuation.section.directive.end.erlang" |
| 1149 |
} |
| 1150 |
}, |
| 1151 |
"match": "^\\s*+(-)\\s*+(undef)\\s*+(\\()\\s*+([a-zA-z\\d@_]++)\\s*+(\\))\\s*+(\\.)", |
| 1152 |
"name": "meta.directive.undef.erlang" |
| 1153 |
} |
| 1154 |
] |
| 1155 |
}, |
| 1156 |
"macro-usage": { |
| 1157 |
"captures": { |
| 1158 |
"1": { |
| 1159 |
"name": "keyword.operator.macro.erlang" |
| 1160 |
}, |
| 1161 |
"2": { |
| 1162 |
"name": "entity.name.function.macro.erlang" |
| 1163 |
} |
| 1164 |
}, |
| 1165 |
"match": "(\\?\\??)\\s*+([a-zA-Z\\d@_]++)", |
| 1166 |
"name": "meta.macro-usage.erlang" |
| 1167 |
}, |
| 1168 |
"module-directive": { |
| 1169 |
"captures": { |
| 1170 |
"1": { |
| 1171 |
"name": "punctuation.section.directive.begin.erlang" |
| 1172 |
}, |
| 1173 |
"2": { |
| 1174 |
"name": "keyword.control.directive.module.erlang" |
| 1175 |
}, |
| 1176 |
"3": { |
| 1177 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 1178 |
}, |
| 1179 |
"4": { |
| 1180 |
"name": "entity.name.type.class.module.definition.erlang" |
| 1181 |
}, |
| 1182 |
"5": { |
| 1183 |
"name": "punctuation.definition.parameters.end.erlang" |
| 1184 |
}, |
| 1185 |
"6": { |
| 1186 |
"name": "punctuation.section.directive.end.erlang" |
| 1187 |
} |
| 1188 |
}, |
| 1189 |
"match": "^\\s*+(-)\\s*+(module)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+)\\s*+(\\))\\s*+(\\.)", |
| 1190 |
"name": "meta.directive.module.erlang" |
| 1191 |
}, |
| 1192 |
"number": { |
| 1193 |
"begin": "(?=\\d)", |
| 1194 |
"end": "(?!\\d)", |
| 1195 |
"patterns": [ |
| 1196 |
{ |
| 1197 |
"captures": { |
| 1198 |
"1": { |
| 1199 |
"name": "punctuation.separator.integer-float.erlang" |
| 1200 |
}, |
| 1201 |
"2": { |
| 1202 |
"name": "punctuation.separator.float-exponent.erlang" |
| 1203 |
} |
| 1204 |
}, |
| 1205 |
"match": "\\d++(\\.)\\d++([eE][\\+\\-]?\\d++)?", |
| 1206 |
"name": "constant.numeric.float.erlang" |
| 1207 |
}, |
| 1208 |
{ |
| 1209 |
"captures": { |
| 1210 |
"1": { |
| 1211 |
"name": "punctuation.separator.base-integer.erlang" |
| 1212 |
} |
| 1213 |
}, |
| 1214 |
"match": "2(#)([0-1]++_)*[0-1]++", |
| 1215 |
"name": "constant.numeric.integer.binary.erlang" |
| 1216 |
}, |
| 1217 |
{ |
| 1218 |
"captures": { |
| 1219 |
"1": { |
| 1220 |
"name": "punctuation.separator.base-integer.erlang" |
| 1221 |
} |
| 1222 |
}, |
| 1223 |
"match": "3(#)([0-2]++_)*[0-2]++", |
| 1224 |
"name": "constant.numeric.integer.base-3.erlang" |
| 1225 |
}, |
| 1226 |
{ |
| 1227 |
"captures": { |
| 1228 |
"1": { |
| 1229 |
"name": "punctuation.separator.base-integer.erlang" |
| 1230 |
} |
| 1231 |
}, |
| 1232 |
"match": "4(#)([0-3]++_)*[0-3]++", |
| 1233 |
"name": "constant.numeric.integer.base-4.erlang" |
| 1234 |
}, |
| 1235 |
{ |
| 1236 |
"captures": { |
| 1237 |
"1": { |
| 1238 |
"name": "punctuation.separator.base-integer.erlang" |
| 1239 |
} |
| 1240 |
}, |
| 1241 |
"match": "5(#)([0-4]++_)*[0-4]++", |
| 1242 |
"name": "constant.numeric.integer.base-5.erlang" |
| 1243 |
}, |
| 1244 |
{ |
| 1245 |
"captures": { |
| 1246 |
"1": { |
| 1247 |
"name": "punctuation.separator.base-integer.erlang" |
| 1248 |
} |
| 1249 |
}, |
| 1250 |
"match": "6(#)([0-5]++_)*[0-5]++", |
| 1251 |
"name": "constant.numeric.integer.base-6.erlang" |
| 1252 |
}, |
| 1253 |
{ |
| 1254 |
"captures": { |
| 1255 |
"1": { |
| 1256 |
"name": "punctuation.separator.base-integer.erlang" |
| 1257 |
} |
| 1258 |
}, |
| 1259 |
"match": "7(#)([0-6]++_)*[0-6]++", |
| 1260 |
"name": "constant.numeric.integer.base-7.erlang" |
| 1261 |
}, |
| 1262 |
{ |
| 1263 |
"captures": { |
| 1264 |
"1": { |
| 1265 |
"name": "punctuation.separator.base-integer.erlang" |
| 1266 |
} |
| 1267 |
}, |
| 1268 |
"match": "8(#)([0-7]++_)*[0-7]++", |
| 1269 |
"name": "constant.numeric.integer.octal.erlang" |
| 1270 |
}, |
| 1271 |
{ |
| 1272 |
"captures": { |
| 1273 |
"1": { |
| 1274 |
"name": "punctuation.separator.base-integer.erlang" |
| 1275 |
} |
| 1276 |
}, |
| 1277 |
"match": "9(#)([0-8]++_)*[0-8]++", |
| 1278 |
"name": "constant.numeric.integer.base-9.erlang" |
| 1279 |
}, |
| 1280 |
{ |
| 1281 |
"captures": { |
| 1282 |
"1": { |
| 1283 |
"name": "punctuation.separator.base-integer.erlang" |
| 1284 |
} |
| 1285 |
}, |
| 1286 |
"match": "10(#)(\\d++_)*\\d++", |
| 1287 |
"name": "constant.numeric.integer.decimal.erlang" |
| 1288 |
}, |
| 1289 |
{ |
| 1290 |
"captures": { |
| 1291 |
"1": { |
| 1292 |
"name": "punctuation.separator.base-integer.erlang" |
| 1293 |
} |
| 1294 |
}, |
| 1295 |
"match": "11(#)([\\daA]++_)*[\\daA]++", |
| 1296 |
"name": "constant.numeric.integer.base-11.erlang" |
| 1297 |
}, |
| 1298 |
{ |
| 1299 |
"captures": { |
| 1300 |
"1": { |
| 1301 |
"name": "punctuation.separator.base-integer.erlang" |
| 1302 |
} |
| 1303 |
}, |
| 1304 |
"match": "12(#)([\\da-bA-B]++_)*[\\da-bA-B]++", |
| 1305 |
"name": "constant.numeric.integer.base-12.erlang" |
| 1306 |
}, |
| 1307 |
{ |
| 1308 |
"captures": { |
| 1309 |
"1": { |
| 1310 |
"name": "punctuation.separator.base-integer.erlang" |
| 1311 |
} |
| 1312 |
}, |
| 1313 |
"match": "13(#)([\\da-cA-C]++_)*[\\da-cA-C]++", |
| 1314 |
"name": "constant.numeric.integer.base-13.erlang" |
| 1315 |
}, |
| 1316 |
{ |
| 1317 |
"captures": { |
| 1318 |
"1": { |
| 1319 |
"name": "punctuation.separator.base-integer.erlang" |
| 1320 |
} |
| 1321 |
}, |
| 1322 |
"match": "14(#)([\\da-dA-D]++_)*[\\da-dA-D]++", |
| 1323 |
"name": "constant.numeric.integer.base-14.erlang" |
| 1324 |
}, |
| 1325 |
{ |
| 1326 |
"captures": { |
| 1327 |
"1": { |
| 1328 |
"name": "punctuation.separator.base-integer.erlang" |
| 1329 |
} |
| 1330 |
}, |
| 1331 |
"match": "15(#)([\\da-eA-E]++_)*[\\da-eA-E]++", |
| 1332 |
"name": "constant.numeric.integer.base-15.erlang" |
| 1333 |
}, |
| 1334 |
{ |
| 1335 |
"captures": { |
| 1336 |
"1": { |
| 1337 |
"name": "punctuation.separator.base-integer.erlang" |
| 1338 |
} |
| 1339 |
}, |
| 1340 |
"match": "16(#)([\\da-fA-F]++_)*[\\da-fA-F]++", |
| 1341 |
"name": "constant.numeric.integer.hexadecimal.erlang" |
| 1342 |
}, |
| 1343 |
{ |
| 1344 |
"captures": { |
| 1345 |
"1": { |
| 1346 |
"name": "punctuation.separator.base-integer.erlang" |
| 1347 |
} |
| 1348 |
}, |
| 1349 |
"match": "17(#)([\\da-gA-G]++_)*[\\da-gA-G]++", |
| 1350 |
"name": "constant.numeric.integer.base-17.erlang" |
| 1351 |
}, |
| 1352 |
{ |
| 1353 |
"captures": { |
| 1354 |
"1": { |
| 1355 |
"name": "punctuation.separator.base-integer.erlang" |
| 1356 |
} |
| 1357 |
}, |
| 1358 |
"match": "18(#)([\\da-hA-H]++_)*[\\da-hA-H]++", |
| 1359 |
"name": "constant.numeric.integer.base-18.erlang" |
| 1360 |
}, |
| 1361 |
{ |
| 1362 |
"captures": { |
| 1363 |
"1": { |
| 1364 |
"name": "punctuation.separator.base-integer.erlang" |
| 1365 |
} |
| 1366 |
}, |
| 1367 |
"match": "19(#)([\\da-iA-I]++_)*[\\da-iA-I]++", |
| 1368 |
"name": "constant.numeric.integer.base-19.erlang" |
| 1369 |
}, |
| 1370 |
{ |
| 1371 |
"captures": { |
| 1372 |
"1": { |
| 1373 |
"name": "punctuation.separator.base-integer.erlang" |
| 1374 |
} |
| 1375 |
}, |
| 1376 |
"match": "20(#)([\\da-jA-J]++_)*[\\da-jA-J]++", |
| 1377 |
"name": "constant.numeric.integer.base-20.erlang" |
| 1378 |
}, |
| 1379 |
{ |
| 1380 |
"captures": { |
| 1381 |
"1": { |
| 1382 |
"name": "punctuation.separator.base-integer.erlang" |
| 1383 |
} |
| 1384 |
}, |
| 1385 |
"match": "21(#)([\\da-kA-K]++_)*[\\da-kA-K]++", |
| 1386 |
"name": "constant.numeric.integer.base-21.erlang" |
| 1387 |
}, |
| 1388 |
{ |
| 1389 |
"captures": { |
| 1390 |
"1": { |
| 1391 |
"name": "punctuation.separator.base-integer.erlang" |
| 1392 |
} |
| 1393 |
}, |
| 1394 |
"match": "22(#)([\\da-lA-L]++_)*[\\da-lA-L]++", |
| 1395 |
"name": "constant.numeric.integer.base-22.erlang" |
| 1396 |
}, |
| 1397 |
{ |
| 1398 |
"captures": { |
| 1399 |
"1": { |
| 1400 |
"name": "punctuation.separator.base-integer.erlang" |
| 1401 |
} |
| 1402 |
}, |
| 1403 |
"match": "23(#)([\\da-mA-M]++_)*[\\da-mA-M]++", |
| 1404 |
"name": "constant.numeric.integer.base-23.erlang" |
| 1405 |
}, |
| 1406 |
{ |
| 1407 |
"captures": { |
| 1408 |
"1": { |
| 1409 |
"name": "punctuation.separator.base-integer.erlang" |
| 1410 |
} |
| 1411 |
}, |
| 1412 |
"match": "24(#)([\\da-nA-N]++_)*[\\da-nA-N]++", |
| 1413 |
"name": "constant.numeric.integer.base-24.erlang" |
| 1414 |
}, |
| 1415 |
{ |
| 1416 |
"captures": { |
| 1417 |
"1": { |
| 1418 |
"name": "punctuation.separator.base-integer.erlang" |
| 1419 |
} |
| 1420 |
}, |
| 1421 |
"match": "25(#)([\\da-oA-O]++_)*[\\da-oA-O]++", |
| 1422 |
"name": "constant.numeric.integer.base-25.erlang" |
| 1423 |
}, |
| 1424 |
{ |
| 1425 |
"captures": { |
| 1426 |
"1": { |
| 1427 |
"name": "punctuation.separator.base-integer.erlang" |
| 1428 |
} |
| 1429 |
}, |
| 1430 |
"match": "26(#)([\\da-pA-P]++_)*[\\da-pA-P]++", |
| 1431 |
"name": "constant.numeric.integer.base-26.erlang" |
| 1432 |
}, |
| 1433 |
{ |
| 1434 |
"captures": { |
| 1435 |
"1": { |
| 1436 |
"name": "punctuation.separator.base-integer.erlang" |
| 1437 |
} |
| 1438 |
}, |
| 1439 |
"match": "27(#)([\\da-qA-Q]++_)*[\\da-qA-Q]++", |
| 1440 |
"name": "constant.numeric.integer.base-27.erlang" |
| 1441 |
}, |
| 1442 |
{ |
| 1443 |
"captures": { |
| 1444 |
"1": { |
| 1445 |
"name": "punctuation.separator.base-integer.erlang" |
| 1446 |
} |
| 1447 |
}, |
| 1448 |
"match": "28(#)([\\da-rA-R]++_)*[\\da-rA-R]++", |
| 1449 |
"name": "constant.numeric.integer.base-28.erlang" |
| 1450 |
}, |
| 1451 |
{ |
| 1452 |
"captures": { |
| 1453 |
"1": { |
| 1454 |
"name": "punctuation.separator.base-integer.erlang" |
| 1455 |
} |
| 1456 |
}, |
| 1457 |
"match": "29(#)([\\da-sA-S]++_)*[\\da-sA-S]++", |
| 1458 |
"name": "constant.numeric.integer.base-29.erlang" |
| 1459 |
}, |
| 1460 |
{ |
| 1461 |
"captures": { |
| 1462 |
"1": { |
| 1463 |
"name": "punctuation.separator.base-integer.erlang" |
| 1464 |
} |
| 1465 |
}, |
| 1466 |
"match": "30(#)([\\da-tA-T]++_)*[\\da-tA-T]++", |
| 1467 |
"name": "constant.numeric.integer.base-30.erlang" |
| 1468 |
}, |
| 1469 |
{ |
| 1470 |
"captures": { |
| 1471 |
"1": { |
| 1472 |
"name": "punctuation.separator.base-integer.erlang" |
| 1473 |
} |
| 1474 |
}, |
| 1475 |
"match": "31(#)([\\da-uA-U]++_)*[\\da-uA-U]++", |
| 1476 |
"name": "constant.numeric.integer.base-31.erlang" |
| 1477 |
}, |
| 1478 |
{ |
| 1479 |
"captures": { |
| 1480 |
"1": { |
| 1481 |
"name": "punctuation.separator.base-integer.erlang" |
| 1482 |
} |
| 1483 |
}, |
| 1484 |
"match": "32(#)([\\da-vA-V]++_)*[\\da-vA-V]++", |
| 1485 |
"name": "constant.numeric.integer.base-32.erlang" |
| 1486 |
}, |
| 1487 |
{ |
| 1488 |
"captures": { |
| 1489 |
"1": { |
| 1490 |
"name": "punctuation.separator.base-integer.erlang" |
| 1491 |
} |
| 1492 |
}, |
| 1493 |
"match": "33(#)([\\da-wA-W]++_)*[\\da-wA-W]++", |
| 1494 |
"name": "constant.numeric.integer.base-33.erlang" |
| 1495 |
}, |
| 1496 |
{ |
| 1497 |
"captures": { |
| 1498 |
"1": { |
| 1499 |
"name": "punctuation.separator.base-integer.erlang" |
| 1500 |
} |
| 1501 |
}, |
| 1502 |
"match": "34(#)([\\da-xA-X]++_)*[\\da-xA-X]++", |
| 1503 |
"name": "constant.numeric.integer.base-34.erlang" |
| 1504 |
}, |
| 1505 |
{ |
| 1506 |
"captures": { |
| 1507 |
"1": { |
| 1508 |
"name": "punctuation.separator.base-integer.erlang" |
| 1509 |
} |
| 1510 |
}, |
| 1511 |
"match": "35(#)([\\da-yA-Y]++_)*[\\da-yA-Y]++", |
| 1512 |
"name": "constant.numeric.integer.base-35.erlang" |
| 1513 |
}, |
| 1514 |
{ |
| 1515 |
"captures": { |
| 1516 |
"1": { |
| 1517 |
"name": "punctuation.separator.base-integer.erlang" |
| 1518 |
} |
| 1519 |
}, |
| 1520 |
"match": "36(#)([\\da-zA-Z]++_)*[\\da-zA-Z]++", |
| 1521 |
"name": "constant.numeric.integer.base-36.erlang" |
| 1522 |
}, |
| 1523 |
{ |
| 1524 |
"match": "\\d++#([\\da-zA-Z]++_)*[\\da-zA-Z]++", |
| 1525 |
"name": "invalid.illegal.integer.erlang" |
| 1526 |
}, |
| 1527 |
{ |
| 1528 |
"match": "(\\d++_)*\\d++", |
| 1529 |
"name": "constant.numeric.integer.decimal.erlang" |
| 1530 |
} |
| 1531 |
] |
| 1532 |
}, |
| 1533 |
"parenthesized-expression": { |
| 1534 |
"begin": "(\\()", |
| 1535 |
"beginCaptures": { |
| 1536 |
"1": { |
| 1537 |
"name": "punctuation.section.expression.begin.erlang" |
| 1538 |
} |
| 1539 |
}, |
| 1540 |
"end": "(\\))", |
| 1541 |
"endCaptures": { |
| 1542 |
"1": { |
| 1543 |
"name": "punctuation.section.expression.end.erlang" |
| 1544 |
} |
| 1545 |
}, |
| 1546 |
"name": "meta.expression.parenthesized", |
| 1547 |
"patterns": [ |
| 1548 |
{ |
| 1549 |
"include": "#everything-else" |
| 1550 |
} |
| 1551 |
] |
| 1552 |
}, |
| 1553 |
"record-directive": { |
| 1554 |
"begin": "^\\s*+(-)\\s*+(record)\\s*+(\\()\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(,)", |
| 1555 |
"beginCaptures": { |
| 1556 |
"1": { |
| 1557 |
"name": "punctuation.section.directive.begin.erlang" |
| 1558 |
}, |
| 1559 |
"2": { |
| 1560 |
"name": "keyword.control.directive.import.erlang" |
| 1561 |
}, |
| 1562 |
"3": { |
| 1563 |
"name": "punctuation.definition.parameters.begin.erlang" |
| 1564 |
}, |
| 1565 |
"4": { |
| 1566 |
"name": "entity.name.type.class.record.definition.erlang" |
| 1567 |
}, |
| 1568 |
"5": { |
| 1569 |
"name": "punctuation.separator.parameters.erlang" |
| 1570 |
} |
| 1571 |
}, |
| 1572 |
"end": "(\\))\\s*+(\\.)", |
| 1573 |
"endCaptures": { |
| 1574 |
"1": { |
| 1575 |
"name": "punctuation.definition.parameters.end.erlang" |
| 1576 |
}, |
| 1577 |
"2": { |
| 1578 |
"name": "punctuation.section.directive.end.erlang" |
| 1579 |
} |
| 1580 |
}, |
| 1581 |
"name": "meta.directive.record.erlang", |
| 1582 |
"patterns": [ |
| 1583 |
{ |
| 1584 |
"include": "#internal-record-body" |
| 1585 |
}, |
| 1586 |
{ |
| 1587 |
"include": "#comment" |
| 1588 |
} |
| 1589 |
] |
| 1590 |
}, |
| 1591 |
"record-usage": { |
| 1592 |
"patterns": [ |
| 1593 |
{ |
| 1594 |
"captures": { |
| 1595 |
"1": { |
| 1596 |
"name": "keyword.operator.record.erlang" |
| 1597 |
}, |
| 1598 |
"2": { |
| 1599 |
"name": "entity.name.type.class.record.erlang" |
| 1600 |
}, |
| 1601 |
"3": { |
| 1602 |
"name": "punctuation.separator.record-field.erlang" |
| 1603 |
}, |
| 1604 |
"4": { |
| 1605 |
"name": "variable.other.field.erlang" |
| 1606 |
} |
| 1607 |
}, |
| 1608 |
"match": "(#)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')\\s*+(\\.)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')", |
| 1609 |
"name": "meta.record-usage.erlang" |
| 1610 |
}, |
| 1611 |
{ |
| 1612 |
"begin": "(#)\\s*+([a-z][a-zA-Z\\d@_]*+|'[^']*+')", |
| 1613 |
"beginCaptures": { |
| 1614 |
"1": { |
| 1615 |
"name": "keyword.operator.record.erlang" |
| 1616 |
}, |
| 1617 |
"2": { |
| 1618 |
"name": "entity.name.type.class.record.erlang" |
| 1619 |
} |
| 1620 |
}, |
| 1621 |
"end": "(?<=\\})", |
| 1622 |
"name": "meta.record-usage.erlang", |
| 1623 |
"patterns": [ |
| 1624 |
{ |
| 1625 |
"include": "#internal-record-body" |
| 1626 |
} |
| 1627 |
] |
| 1628 |
} |
| 1629 |
] |
| 1630 |
}, |
| 1631 |
"string": { |
| 1632 |
"begin": "(\")", |
| 1633 |
"beginCaptures": { |
| 1634 |
"1": { |
| 1635 |
"name": "punctuation.definition.string.begin.erlang" |
| 1636 |
} |
| 1637 |
}, |
| 1638 |
"end": "(\")", |
| 1639 |
"endCaptures": { |
| 1640 |
"1": { |
| 1641 |
"name": "punctuation.definition.string.end.erlang" |
| 1642 |
} |
| 1643 |
}, |
| 1644 |
"name": "string.quoted.double.erlang", |
| 1645 |
"patterns": [ |
| 1646 |
{ |
| 1647 |
"captures": { |
| 1648 |
"1": { |
| 1649 |
"name": "punctuation.definition.escape.erlang" |
| 1650 |
}, |
| 1651 |
"3": { |
| 1652 |
"name": "punctuation.definition.escape.erlang" |
| 1653 |
} |
| 1654 |
}, |
| 1655 |
"match": "(\\\\)([bdefnrstv\\\\'\"]|(\\^)[@-_a-z]|[0-7]{1,3}|x[\\da-fA-F]{2})", |
| 1656 |
"name": "constant.character.escape.erlang" |
| 1657 |
}, |
| 1658 |
{ |
| 1659 |
"match": "\\\\\\^?.?", |
| 1660 |
"name": "invalid.illegal.string.erlang" |
| 1661 |
}, |
| 1662 |
{ |
| 1663 |
"captures": { |
| 1664 |
"1": { |
| 1665 |
"name": "punctuation.definition.placeholder.erlang" |
| 1666 |
}, |
| 1667 |
"3": { |
| 1668 |
"name": "punctuation.separator.placeholder-parts.erlang" |
| 1669 |
}, |
| 1670 |
"4": { |
| 1671 |
"name": "punctuation.separator.placeholder-parts.erlang" |
| 1672 |
}, |
| 1673 |
"6": { |
| 1674 |
"name": "punctuation.separator.placeholder-parts.erlang" |
| 1675 |
}, |
| 1676 |
"8": { |
| 1677 |
"name": "punctuation.separator.placeholder-parts.erlang" |
| 1678 |
}, |
| 1679 |
"10": { |
| 1680 |
"name": "punctuation.separator.placeholder-parts.erlang" |
| 1681 |
}, |
| 1682 |
"12": { |
| 1683 |
"name": "punctuation.separator.placeholder-parts.erlang" |
| 1684 |
} |
| 1685 |
}, |
| 1686 |
"match": "(~)((\\-)?\\d++|(\\*))?((\\.)(\\d++|(\\*)))?((\\.)((\\*)|.))?[~cfegswpWPBX#bx\\+ni]", |
| 1687 |
"name": "constant.other.placeholder.erlang" |
| 1688 |
}, |
| 1689 |
{ |
| 1690 |
"captures": { |
| 1691 |
"1": { |
| 1692 |
"name": "punctuation.definition.placeholder.erlang" |
| 1693 |
}, |
| 1694 |
"2": { |
| 1695 |
"name": "punctuation.separator.placeholder-parts.erlang" |
| 1696 |
} |
| 1697 |
}, |
| 1698 |
"match": "(~)(\\*)?(\\d++)?[~du\\-#fsacl]", |
| 1699 |
"name": "constant.other.placeholder.erlang" |
| 1700 |
}, |
| 1701 |
{ |
| 1702 |
"match": "~[^\"]?", |
| 1703 |
"name": "invalid.illegal.string.erlang" |
| 1704 |
} |
| 1705 |
] |
| 1706 |
}, |
| 1707 |
"symbolic-operator": { |
| 1708 |
"match": "\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::|\\?=", |
| 1709 |
"name": "keyword.operator.symbolic.erlang" |
| 1710 |
}, |
| 1711 |
"textual-operator": { |
| 1712 |
"match": "\\b(andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b", |
| 1713 |
"name": "keyword.operator.textual.erlang" |
| 1714 |
}, |
| 1715 |
"tuple": { |
| 1716 |
"begin": "(\\{)", |
| 1717 |
"beginCaptures": { |
| 1718 |
"1": { |
| 1719 |
"name": "punctuation.definition.tuple.begin.erlang" |
| 1720 |
} |
| 1721 |
}, |
| 1722 |
"end": "(\\})", |
| 1723 |
"endCaptures": { |
| 1724 |
"1": { |
| 1725 |
"name": "punctuation.definition.tuple.end.erlang" |
| 1726 |
} |
| 1727 |
}, |
| 1728 |
"name": "meta.structure.tuple.erlang", |
| 1729 |
"patterns": [ |
| 1730 |
{ |
| 1731 |
"match": ",", |
| 1732 |
"name": "punctuation.separator.tuple.erlang" |
| 1733 |
}, |
| 1734 |
{ |
| 1735 |
"include": "#everything-else" |
| 1736 |
} |
| 1737 |
] |
| 1738 |
}, |
| 1739 |
"variable": { |
| 1740 |
"captures": { |
| 1741 |
"1": { |
| 1742 |
"name": "variable.other.erlang" |
| 1743 |
}, |
| 1744 |
"2": { |
| 1745 |
"name": "variable.language.omitted.erlang" |
| 1746 |
} |
| 1747 |
}, |
| 1748 |
"match": "(_[a-zA-Z\\d@_]++|[A-Z][a-zA-Z\\d@_]*+)|(_)" |
| 1749 |
} |
| 1750 |
}, |
| 1751 |
"scopeName": "source.erlang", |
| 1752 |
"uuid": "58EA597D-5158-4BF7-9FB2-B05135D1E166" |
| 1753 |
} |
| 1754 |
|