View raw

1 { 2 "comment": "Syntax Parser for Elixir Programming Language.", 3 "fileTypes": ["ex", "exs"], 4 "firstLineMatch": "^#!/.*\\belixir", 5 "foldingStartMarker": "(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$", 6 "foldingStopMarker": "^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)", 7 "name": "Elixir", 8 "injections": { 9 "R:text.html.elixir meta.tag meta.attribute string.quoted": { 10 "comment": "Uses R: to ensure this matches after any other injections.", 11 "patterns": [ 12 { 13 "include": "text.elixir" 14 } 15 ] 16 } 17 }, 18 "patterns": [ 19 { 20 "captures": { 21 "1": { 22 "name": "keyword.control.module.elixir" 23 }, 24 "2": { 25 "name": "entity.name.type.module.elixir" 26 } 27 }, 28 "match": "^\\s*(defmodule|defprotocol|defimpl)\\s+(([A-Z][A-Za-z0-9_]*\\s*(\\.)\\s*)*[A-Z][A-Za-z0-9_]*)", 29 "name": "meta.module.elixir" 30 }, 31 { 32 "begin": "@(module|type)?doc\\s*(~s)?\"\"\"", 33 "comment": "@doc with interpolated heredocs", 34 "end": "\\s*\"\"\"", 35 "name": "comment.documentation.heredoc.elixir", 36 "patterns": [ 37 { 38 "include": "#interpolated_elixir" 39 }, 40 { 41 "include": "#escaped_char" 42 } 43 ] 44 }, 45 { 46 "begin": "@(module|type)?doc\\s*(~s)?'''", 47 "comment": "@doc with interpolated single quoted heredocs", 48 "end": "\\s*'''", 49 "name": "comment.documentation.heredoc.elixir", 50 "patterns": [ 51 { 52 "include": "#interpolated_elixir" 53 }, 54 { 55 "include": "#escaped_char" 56 } 57 ] 58 }, 59 { 60 "begin": "@(module|type)?doc\\s*~S\"\"\"", 61 "comment": "@doc with heredocs is treated as documentation", 62 "end": "\\s*\"\"\"", 63 "name": "comment.documentation.heredoc.elixir", 64 "patterns": [ 65 { 66 "include": "#escaped_char" 67 } 68 ] 69 }, 70 { 71 "begin": "@(module|type)?doc\\s*~S'''", 72 "comment": "@doc with heredocs is treated as documentation", 73 "end": "\\s*'''", 74 "name": "comment.documentation.heredoc.elixir", 75 "patterns": [ 76 { 77 "include": "#escaped_char" 78 } 79 ] 80 }, 81 { 82 "comment": "@doc false is treated as documentation", 83 "match": "@(module|type)?doc\\s*false", 84 "name": "comment.documentation.false" 85 }, 86 { 87 "comment": "@doc since|deprecated is treated as documentation", 88 "begin": "@(module|type)?doc\\s*(since|deprecated): '", 89 "end": "'", 90 "name": "comment.documentation.false" 91 }, 92 { 93 "comment": "@doc since|deprecated is treated as documentation", 94 "begin": "@(module|type)?doc\\s*(since|deprecated): \"", 95 "end": "\"", 96 "name": "comment.documentation.false" 97 }, 98 { 99 "comment": "@deprecated is treated as documentation", 100 "begin": "@deprecated\\s*'", 101 "end": "'", 102 "name": "comment.documentation.false" 103 }, 104 { 105 "comment": "@deprecated is treated as documentation", 106 "begin": "@deprecated\\s*\"", 107 "end": "\"", 108 "name": "comment.documentation.false" 109 }, 110 { 111 "begin": "@(module|type)?doc\\s*\"", 112 "comment": "@doc with string is treated as documentation", 113 "end": "\"", 114 "name": "comment.documentation.string", 115 "patterns": [ 116 { 117 "include": "#interpolated_elixir" 118 }, 119 { 120 "include": "#escaped_char" 121 } 122 ] 123 }, 124 { 125 "begin": "@(module|type)?doc\\s*'", 126 "comment": "@doc with string is treated as documentation", 127 "end": "'", 128 "name": "comment.documentation.string", 129 "patterns": [ 130 { 131 "include": "#interpolated_elixir" 132 }, 133 { 134 "include": "#escaped_char" 135 } 136 ] 137 }, 138 { 139 "match": "(?<!\\.)\\b(alias|require|import|use)\\b(?![?!])", 140 "name": "keyword.other.special-method.elixir" 141 }, 142 { 143 "captures": { 144 "1": { 145 "name": "punctuation.definition.constant.elixir" 146 } 147 }, 148 "comment": "Atom key", 149 "match": "(?:<<<|<<>>|<<~|<~>|<>|<=|<-|<~|<|>>>|>=|>|\\+\\+\\+|\\+\\+|\\+|---|--|->|-|\\*\\*|\\*|\\|\\|\\||\\|\\||\\|>|\\||%{}|%|&&&|&&|&|===|==|=~|=>|=|!==|!=|!|\\.\\.|\\.|~>>|~>|\\^|{}|@|\\/|\\\\\\\\|[\\p{L}_][\\p{L}\\p{N}_@]*[?!]?)(:)(?!:|\\b)", 150 "name": "constant.language.symbol.elixir" 151 }, 152 { 153 "match": "(?<!\\.)\\b(do|end|case|for|if|cond|with|unless|try|receive|fn|defmodule|defprotocol|defimpl|defrecordp?|defstruct|defcallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|reraise|throw|quote|unquote|unquote_splicing|super|when|and|or|not|in)\\b(?![?!])", 154 "name": "keyword.control.elixir" 155 }, 156 { 157 "comment": "Function with parameters", 158 "begin": "\\b(defp?|defmacrop?|defguardp?|defdelegate)\\b\\s*([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*\\(", 159 "name": "meta.function.definition.elixir", 160 "beginCaptures": { 161 "1": { 162 "name": "keyword.control.elixir" 163 }, 164 "2": { 165 "name": "entity.name.function.elixir" 166 } 167 }, 168 "end": "\\)", 169 "patterns": [ 170 { 171 "include": "$self" 172 } 173 ] 174 }, 175 { 176 "comment": "Function without parameters", 177 "match": "\\b(defp?|defmacrop?|defguardp?|defdelegate)\\b\\s*([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)", 178 "name": "meta.function.definition.elixir", 179 "captures": { 180 "1": { 181 "name": "keyword.control.elixir" 182 }, 183 "2": { 184 "name": "entity.name.function.elixir" 185 } 186 } 187 }, 188 { 189 "comment": "Typespec with parameters", 190 "begin": "((@)(callback|macrocallback|spec|typep?|opaque))\\b\\s*([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*\\(", 191 "name": "meta.type.definition.elixir", 192 "beginCaptures": { 193 "2": { 194 "name": "punctuation.definition.variable.elixir" 195 }, 196 "1": { 197 "name": "variable.other.constant.elixir" 198 }, 199 "4": { 200 "name": "entity.name.function.typespec.elixir" 201 } 202 }, 203 "end": "\\)", 204 "patterns": [ 205 { 206 "include": "$self" 207 } 208 ] 209 }, 210 { 211 "comment": "Typespec without parameters", 212 "match": "((@)(callback|macrocallback|spec|typep?|opaque))\\b\\s*([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)", 213 "name": "meta.type.definition.elixir", 214 "captures": { 215 "2": { 216 "name": "punctuation.definition.variable.elixir" 217 }, 218 "1": { 219 "name": "variable.other.constant.elixir" 220 }, 221 "4": { 222 "name": "entity.name.function.typespec.elixir" 223 } 224 } 225 }, 226 { 227 "comment": " as above, just doesn't need a 'end' and does a logic operation", 228 "match": "(?<!\\.)\\b(and|not|or|when|in)\\b", 229 "name": "keyword.operator.elixir" 230 }, 231 { 232 "comment": "Keyword", 233 "match": "\\b(nil|true|false)\\b(?![?!])", 234 "name": "constant.language.elixir" 235 }, 236 { 237 "comment": "Access", 238 "match": "((@)[_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*(\\.)\\s*\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*(\\.)\\s*\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)(?!\\s*\\.)", 239 "captures": { 240 "2": { 241 "name": "punctuation.definition.variable.elixir" 242 }, 243 "1": { 244 "name": "variable.other.constant.elixir" 245 }, 246 "3": { 247 "name": "punctuation.separator.method.elixir" 248 }, 249 "4": { 250 "name": "variable.other.readwrite.elixir" 251 }, 252 "5": { 253 "name": "punctuation.separator.method.elixir" 254 }, 255 "6": { 256 "name": "variable.other.readwrite.elixir" 257 } 258 } 259 }, 260 { 261 "comment": "Access", 262 "match": "((@)[_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*(\\.)\\s*\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)", 263 "captures": { 264 "2": { 265 "name": "punctuation.definition.variable.elixir" 266 }, 267 "1": { 268 "name": "variable.other.constant.elixir" 269 }, 270 "3": { 271 "name": "punctuation.separator.method.elixir" 272 }, 273 "4": { 274 "name": "variable.other.readwrite.elixir" 275 } 276 } 277 }, 278 { 279 "comment": "Access", 280 "match": "\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*(\\.)\\s*\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*(\\.)\\s*\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)(?!\\s*\\.)", 281 "captures": { 282 "1": { 283 "name": "variable.other.readwrite.elixir" 284 }, 285 "2": { 286 "name": "punctuation.separator.method.elixir" 287 }, 288 "3": { 289 "name": "variable.other.readwrite.elixir" 290 }, 291 "4": { 292 "name": "punctuation.separator.method.elixir" 293 }, 294 "5": { 295 "name": "variable.other.readwrite.elixir" 296 } 297 } 298 }, 299 { 300 "comment": "Access", 301 "match": "\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)\\s*(\\.)\\s*\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)", 302 "captures": { 303 "1": { 304 "name": "variable.other.readwrite.elixir" 305 }, 306 "2": { 307 "name": "punctuation.separator.method.elixir" 308 }, 309 "3": { 310 "name": "variable.other.readwrite.elixir" 311 } 312 } 313 }, 314 { 315 "comment": "Dot call", 316 "match": "\\b(?<=\\.)\\s*([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)(?!\\s*\\.)", 317 "name": "entity.name.function.call.dot.elixir" 318 }, 319 { 320 "begin": "(?<=\\.)\\s*\"", 321 "captures": { 322 "1": { 323 "name": "punctuation.definition.constant.elixir" 324 } 325 }, 326 "end": "\"(?!\\s*\\.)", 327 "name": "entity.name.function.call.dot.elixir", 328 "patterns": [ 329 { 330 "include": "#escaped_char" 331 } 332 ] 333 }, 334 { 335 "begin": "(?<=\\.)\\s*'", 336 "captures": { 337 "1": { 338 "name": "punctuation.definition.constant.elixir" 339 } 340 }, 341 "end": "'(?!\\s*\\.)", 342 "name": "entity.name.function.call.dot.elixir", 343 "patterns": [ 344 { 345 "include": "#escaped_char" 346 } 347 ] 348 }, 349 { 350 "comment": "Local function capture", 351 "match": "(\\&)([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)(\\/)([0-9]+)", 352 "captures": { 353 "1": { 354 "name": "keyword.operator.other.elixir" 355 }, 356 "2": { 357 "name": "entity.name.function.call.capture.elixir" 358 }, 359 "3": { 360 "name": "keyword.operator.arithmetic.elixir" 361 }, 362 "4": { 363 "name": "constant.numeric.elixir" 364 } 365 } 366 }, 367 { 368 "comment": "Local function call", 369 "match": "\\b([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)(?=\\s*?\\()", 370 "name": "entity.name.function.call.local.elixir" 371 }, 372 { 373 "comment": "Pipe into no parens local function call", 374 "match": "(?<=\\|\\>\\s*)([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)", 375 "name": "entity.name.function.call.local.pipe.elixir" 376 }, 377 { 378 "match": "\\b(__(CALLER|ENV|MODULE|DIR|STACKTRACE)__)\\b(?![?!])", 379 "name": "variable.language.elixir" 380 }, 381 { 382 "match": "\\b[A-Z][A-Za-z0-9_]*\\b", 383 "name": "entity.name.type.module.elixir" 384 }, 385 { 386 "match": "\\b(0[xX]\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01](?:[_01]*[01]+|[01]*)|0o[0-7](?:[_0-7]*[0-7]+|[0-7]*))\\b", 387 "name": "constant.numeric.elixir" 388 }, 389 { 390 "comment": "Regex sigil with curlies", 391 "begin": "~r\\{", 392 "beginCaptures": { 393 "0": { 394 "name": "punctuation.section.regexp.begin.elixir" 395 } 396 }, 397 "end": "\\}[eimnosux]*", 398 "endCaptures": { 399 "0": { 400 "name": "punctuation.section.regexp.end.elixir" 401 } 402 }, 403 "name": "string.regexp.interpolated.elixir", 404 "patterns": [ 405 { 406 "include": "#regex_sub" 407 }, 408 { 409 "include": "#nest_curly" 410 } 411 ] 412 }, 413 { 414 "comment": "Regex sigil with pipes", 415 "begin": "~r\\|", 416 "beginCaptures": { 417 "0": { 418 "name": "punctuation.section.regexp.begin.elixir" 419 } 420 }, 421 "end": "\\|[eimnosux]*", 422 "endCaptures": { 423 "0": { 424 "name": "punctuation.section.regexp.end.elixir" 425 } 426 }, 427 "name": "string.regexp.interpolated.elixir", 428 "patterns": [ 429 { 430 "include": "#regex_sub" 431 } 432 ] 433 }, 434 { 435 "comment": "Regex sigil with parens", 436 "begin": "~r\\(", 437 "beginCaptures": { 438 "0": { 439 "name": "punctuation.section.regexp.begin.elixir" 440 } 441 }, 442 "end": "\\)[eimnosux]*", 443 "endCaptures": { 444 "0": { 445 "name": "punctuation.section.regexp.end.elixir" 446 } 447 }, 448 "name": "string.regexp.interpolated.elixir", 449 "patterns": [ 450 { 451 "include": "#regex_sub" 452 } 453 ] 454 }, 455 { 456 "comment": "Regex sigil with slashes", 457 "begin": "~r\\/", 458 "beginCaptures": { 459 "0": { 460 "name": "punctuation.section.regexp.begin.elixir" 461 } 462 }, 463 "end": "\\/[eimnosux]*", 464 "endCaptures": { 465 "0": { 466 "name": "punctuation.section.regexp.end.elixir" 467 } 468 }, 469 "name": "string.regexp.interpolated.elixir", 470 "patterns": [ 471 { 472 "include": "#regex_sub" 473 } 474 ] 475 }, 476 { 477 "comment": "Regex sigil with brackets", 478 "begin": "~r\\[", 479 "beginCaptures": { 480 "0": { 481 "name": "punctuation.section.regexp.begin.elixir" 482 } 483 }, 484 "end": "\\][eimnosux]*", 485 "endCaptures": { 486 "0": { 487 "name": "punctuation.section.regexp.end.elixir" 488 } 489 }, 490 "name": "string.regexp.interpolated.elixir", 491 "patterns": [ 492 { 493 "include": "#regex_sub" 494 }, 495 { 496 "include": "#nest_brackets" 497 } 498 ] 499 }, 500 { 501 "comment": "Regex sigil with ltgt", 502 "begin": "~r\\<", 503 "beginCaptures": { 504 "0": { 505 "name": "punctuation.section.regexp.begin.elixir" 506 } 507 }, 508 "end": "\\>[eimnosux]*", 509 "endCaptures": { 510 "0": { 511 "name": "punctuation.section.regexp.end.elixir" 512 } 513 }, 514 "name": "string.regexp.interpolated.elixir", 515 "patterns": [ 516 { 517 "include": "#regex_sub" 518 } 519 ] 520 }, 521 { 522 "comment": "Regex sigil with single quoted heredocs", 523 "begin": "~r\\'\\'\\'", 524 "beginCaptures": { 525 "0": { 526 "name": "punctuation.section.regexp.begin.elixir" 527 } 528 }, 529 "end": "\\'\\'\\'[eimnosux]*", 530 "endCaptures": { 531 "0": { 532 "name": "punctuation.section.regexp.end.elixir" 533 } 534 }, 535 "name": "string.regexp.interpolated.elixir", 536 "patterns": [ 537 { 538 "include": "#regex_sub" 539 } 540 ] 541 }, 542 { 543 "comment": "Regex sigil with double quotes heredocs", 544 "begin": "~r\\\"\\\"\\\"", 545 "beginCaptures": { 546 "0": { 547 "name": "punctuation.section.regexp.begin.elixir" 548 } 549 }, 550 "end": "\\\"\\\"\\\"[eimnosux]*", 551 "endCaptures": { 552 "0": { 553 "name": "punctuation.section.regexp.end.elixir" 554 } 555 }, 556 "name": "string.regexp.interpolated.elixir", 557 "patterns": [ 558 { 559 "include": "#regex_sub" 560 } 561 ] 562 }, 563 { 564 "comment": "Regex sigil with double quotes", 565 "begin": "~r\\\"", 566 "beginCaptures": { 567 "0": { 568 "name": "punctuation.section.regexp.begin.elixir" 569 } 570 }, 571 "end": "\\\"[eimnosux]*", 572 "endCaptures": { 573 "0": { 574 "name": "punctuation.section.regexp.end.elixir" 575 } 576 }, 577 "name": "string.regexp.interpolated.elixir", 578 "patterns": [ 579 { 580 "include": "#regex_sub" 581 } 582 ] 583 }, 584 { 585 "comment": "Regex sigil with single quotes", 586 "begin": "~r\\'", 587 "beginCaptures": { 588 "0": { 589 "name": "punctuation.section.regexp.begin.elixir" 590 } 591 }, 592 "end": "\\'[eimnosux]*", 593 "endCaptures": { 594 "0": { 595 "name": "punctuation.section.regexp.end.elixir" 596 } 597 }, 598 "name": "string.regexp.interpolated.elixir", 599 "patterns": [ 600 { 601 "include": "#regex_sub" 602 } 603 ] 604 }, 605 { 606 "comment": "Literal regex sigil with curlies", 607 "begin": "~R\\{", 608 "beginCaptures": { 609 "0": { 610 "name": "punctuation.section.regexp.begin.elixir" 611 } 612 }, 613 "end": "\\}[eimnosux]*", 614 "endCaptures": { 615 "0": { 616 "name": "punctuation.section.regexp.end.elixir" 617 } 618 }, 619 "name": "string.regexp.literal.elixir", 620 "patterns": [ 621 { 622 "include": "#nest_curly" 623 } 624 ] 625 }, 626 { 627 "comment": "Literal regex sigil with pipes", 628 "begin": "~R\\|", 629 "beginCaptures": { 630 "0": { 631 "name": "punctuation.section.regexp.begin.elixir" 632 } 633 }, 634 "end": "\\|[eimnosux]*", 635 "endCaptures": { 636 "0": { 637 "name": "punctuation.section.regexp.end.elixir" 638 } 639 }, 640 "name": "string.regexp.literal.elixir" 641 }, 642 { 643 "comment": "Literal regex sigil with parens", 644 "begin": "~R\\(", 645 "beginCaptures": { 646 "0": { 647 "name": "punctuation.section.regexp.begin.elixir" 648 } 649 }, 650 "end": "\\)[eimnosux]*", 651 "endCaptures": { 652 "0": { 653 "name": "punctuation.section.regexp.end.elixir" 654 } 655 }, 656 "name": "string.regexp.literal.elixir", 657 "patterns": [ 658 { 659 "include": "#nest_parens" 660 } 661 ] 662 }, 663 { 664 "comment": "Literal regex sigil with slashes", 665 "begin": "~R\\/", 666 "beginCaptures": { 667 "0": { 668 "name": "punctuation.section.regexp.begin.elixir" 669 } 670 }, 671 "end": "\\/[eimnosux]*", 672 "endCaptures": { 673 "0": { 674 "name": "punctuation.section.regexp.end.elixir" 675 } 676 }, 677 "name": "string.regexp.literal.elixir" 678 }, 679 { 680 "comment": "Literal regex sigil with brackets", 681 "begin": "~R\\[", 682 "beginCaptures": { 683 "0": { 684 "name": "punctuation.section.regexp.begin.elixir" 685 } 686 }, 687 "end": "\\][eimnosux]*", 688 "endCaptures": { 689 "0": { 690 "name": "punctuation.section.regexp.end.elixir" 691 } 692 }, 693 "name": "string.regexp.literal.elixir", 694 "patterns": [ 695 { 696 "include": "#nest_brackets" 697 } 698 ] 699 }, 700 { 701 "comment": "Literal regex sigil with ltgt", 702 "begin": "~R\\<", 703 "beginCaptures": { 704 "0": { 705 "name": "punctuation.section.regexp.begin.elixir" 706 } 707 }, 708 "end": "\\>[eimnosux]*", 709 "endCaptures": { 710 "0": { 711 "name": "punctuation.section.regexp.end.elixir" 712 } 713 }, 714 "name": "string.regexp.literal.elixir" 715 }, 716 { 717 "comment": "Literal regex sigil with single quoted heredoc", 718 "begin": "~R\\'\\'\\'", 719 "beginCaptures": { 720 "0": { 721 "name": "punctuation.section.regexp.begin.elixir" 722 } 723 }, 724 "end": "\\'\\'\\'[eimnosux]*", 725 "endCaptures": { 726 "0": { 727 "name": "punctuation.section.regexp.end.elixir" 728 } 729 }, 730 "name": "string.regexp.literal.elixir" 731 }, 732 { 733 "comment": "Literal regex sigil with double quoted heredoc", 734 "begin": "~R\\\"\\\"\\\"", 735 "beginCaptures": { 736 "0": { 737 "name": "punctuation.section.regexp.begin.elixir" 738 } 739 }, 740 "end": "\\\"\\\"\\\"[eimnosux]*", 741 "endCaptures": { 742 "0": { 743 "name": "punctuation.section.regexp.end.elixir" 744 } 745 }, 746 "name": "string.regexp.literal.elixir" 747 }, 748 { 749 "comment": "Literal regex sigil with double quotes", 750 "begin": "~R\\\"", 751 "beginCaptures": { 752 "0": { 753 "name": "punctuation.section.regexp.begin.elixir" 754 } 755 }, 756 "end": "\\\"[eimnosux]*", 757 "endCaptures": { 758 "0": { 759 "name": "punctuation.section.regexp.end.elixir" 760 } 761 }, 762 "name": "string.regexp.literal.elixir" 763 }, 764 { 765 "comment": "Literal regex sigil with single quotes", 766 "begin": "~R\\'", 767 "beginCaptures": { 768 "0": { 769 "name": "punctuation.section.regexp.begin.elixir" 770 } 771 }, 772 "end": "\\'[eimnosux]*", 773 "endCaptures": { 774 "0": { 775 "name": "punctuation.section.regexp.end.elixir" 776 } 777 }, 778 "name": "string.regexp.literal.elixir" 779 }, 780 { 781 "comment": "Character list sigil with curlies", 782 "begin": "~c\\{", 783 "beginCaptures": { 784 "0": { 785 "name": "punctuation.definition.string.begin.elixir" 786 } 787 }, 788 "end": "\\}[a-z]*", 789 "endCaptures": { 790 "0": { 791 "name": "punctuation.definition.string.end.elixir" 792 } 793 }, 794 "name": "string.quoted.single.elixir", 795 "patterns": [ 796 { 797 "include": "#interpolated_elixir" 798 }, 799 { 800 "include": "#escaped_char" 801 } 802 ] 803 }, 804 { 805 "comment": "Character list sigil with pipes", 806 "begin": "~c\\|", 807 "beginCaptures": { 808 "0": { 809 "name": "punctuation.definition.string.begin.elixir" 810 } 811 }, 812 "end": "\\|[a-z]*", 813 "endCaptures": { 814 "0": { 815 "name": "punctuation.definition.string.end.elixir" 816 } 817 }, 818 "name": "string.quoted.single.elixir", 819 "patterns": [ 820 { 821 "include": "#interpolated_elixir" 822 }, 823 { 824 "include": "#escaped_char" 825 } 826 ] 827 }, 828 { 829 "comment": "Character list sigil with parens", 830 "begin": "~c\\(", 831 "beginCaptures": { 832 "0": { 833 "name": "punctuation.definition.string.begin.elixir" 834 } 835 }, 836 "end": "\\)[a-z]*", 837 "endCaptures": { 838 "0": { 839 "name": "punctuation.definition.string.end.elixir" 840 } 841 }, 842 "name": "string.quoted.single.elixir", 843 "patterns": [ 844 { 845 "include": "#interpolated_elixir" 846 }, 847 { 848 "include": "#escaped_char" 849 } 850 ] 851 }, 852 { 853 "comment": "Character list sigil with curlies", 854 "begin": "~c\\<", 855 "beginCaptures": { 856 "0": { 857 "name": "punctuation.definition.string.begin.elixir" 858 } 859 }, 860 "end": "\\>[a-z]*", 861 "endCaptures": { 862 "0": { 863 "name": "punctuation.definition.string.end.elixir" 864 } 865 }, 866 "name": "string.quoted.single.elixir", 867 "patterns": [ 868 { 869 "include": "#interpolated_elixir" 870 }, 871 { 872 "include": "#escaped_char" 873 } 874 ] 875 }, 876 { 877 "comment": "Character list sigil with curlies", 878 "begin": "~c\\[", 879 "beginCaptures": { 880 "0": { 881 "name": "punctuation.definition.string.begin.elixir" 882 } 883 }, 884 "end": "\\][a-z]*", 885 "endCaptures": { 886 "0": { 887 "name": "punctuation.definition.string.end.elixir" 888 } 889 }, 890 "name": "string.quoted.single.elixir", 891 "patterns": [ 892 { 893 "include": "#interpolated_elixir" 894 }, 895 { 896 "include": "#escaped_char" 897 } 898 ] 899 }, 900 { 901 "comment": "Character list sigil with curlies", 902 "begin": "~c\\/", 903 "beginCaptures": { 904 "0": { 905 "name": "punctuation.definition.string.begin.elixir" 906 } 907 }, 908 "end": "\\/[a-z]*", 909 "endCaptures": { 910 "0": { 911 "name": "punctuation.definition.string.end.elixir" 912 } 913 }, 914 "name": "string.quoted.single.elixir", 915 "patterns": [ 916 { 917 "include": "#interpolated_elixir" 918 }, 919 { 920 "include": "#escaped_char" 921 } 922 ] 923 }, 924 { 925 "comment": "Character list sigil with single quoted heredoc", 926 "begin": "~c\\'\\'\\'", 927 "beginCaptures": { 928 "0": { 929 "name": "punctuation.definition.string.begin.elixir" 930 } 931 }, 932 "end": "\\'\\'\\'[a-z]*", 933 "endCaptures": { 934 "0": { 935 "name": "punctuation.definition.string.end.elixir" 936 } 937 }, 938 "name": "string.quoted.single.elixir", 939 "patterns": [ 940 { 941 "include": "#interpolated_elixir" 942 }, 943 { 944 "include": "#escaped_char" 945 } 946 ] 947 }, 948 { 949 "comment": "Character list sigil with double quoted heredoc", 950 "begin": "~c\\\"\\\"\\\"", 951 "beginCaptures": { 952 "0": { 953 "name": "punctuation.definition.string.begin.elixir" 954 } 955 }, 956 "end": "\\\"\\\"\\\"[a-z]*", 957 "endCaptures": { 958 "0": { 959 "name": "punctuation.definition.string.end.elixir" 960 } 961 }, 962 "name": "string.quoted.single.elixir", 963 "patterns": [ 964 { 965 "include": "#interpolated_elixir" 966 }, 967 { 968 "include": "#escaped_char" 969 } 970 ] 971 }, 972 { 973 "comment": "Character list sigil with curlies", 974 "begin": "~c\\'", 975 "beginCaptures": { 976 "0": { 977 "name": "punctuation.definition.string.begin.elixir" 978 } 979 }, 980 "end": "\\'[a-z]*", 981 "endCaptures": { 982 "0": { 983 "name": "punctuation.definition.string.end.elixir" 984 } 985 }, 986 "name": "string.quoted.single.elixir", 987 "patterns": [ 988 { 989 "include": "#interpolated_elixir" 990 }, 991 { 992 "include": "#escaped_char" 993 } 994 ] 995 }, 996 { 997 "comment": "Character list sigil with curlies", 998 "begin": "~c\\\"", 999 "beginCaptures": { 1000 "0": { 1001 "name": "punctuation.definition.string.begin.elixir" 1002 } 1003 }, 1004 "end": "\\\"[a-z]*", 1005 "endCaptures": { 1006 "0": { 1007 "name": "punctuation.definition.string.end.elixir" 1008 } 1009 }, 1010 "name": "string.quoted.single.elixir", 1011 "patterns": [ 1012 { 1013 "include": "#interpolated_elixir" 1014 }, 1015 { 1016 "include": "#escaped_char" 1017 } 1018 ] 1019 }, 1020 { 1021 "comment": "Literal Character list sigil with curlies", 1022 "begin": "~C\\{", 1023 "beginCaptures": { 1024 "0": { 1025 "name": "punctuation.definition.string.begin.elixir" 1026 } 1027 }, 1028 "end": "\\}[a-z]*", 1029 "endCaptures": { 1030 "0": { 1031 "name": "punctuation.definition.string.end.elixir" 1032 } 1033 }, 1034 "name": "string.quoted.single.elixir" 1035 }, 1036 { 1037 "comment": "Literal Character list sigil with pipes", 1038 "begin": "~C\\|", 1039 "beginCaptures": { 1040 "0": { 1041 "name": "punctuation.definition.string.begin.elixir" 1042 } 1043 }, 1044 "end": "\\|[a-z]*", 1045 "endCaptures": { 1046 "0": { 1047 "name": "punctuation.definition.string.end.elixir" 1048 } 1049 }, 1050 "name": "string.quoted.single.elixir" 1051 }, 1052 { 1053 "comment": "Literal Character list sigil with parens", 1054 "begin": "~C\\(", 1055 "beginCaptures": { 1056 "0": { 1057 "name": "punctuation.definition.string.begin.elixir" 1058 } 1059 }, 1060 "end": "\\)[a-z]*", 1061 "endCaptures": { 1062 "0": { 1063 "name": "punctuation.definition.string.end.elixir" 1064 } 1065 }, 1066 "name": "string.quoted.single.elixir" 1067 }, 1068 { 1069 "comment": "Literal Character list sigil with curlies", 1070 "begin": "~C\\<", 1071 "beginCaptures": { 1072 "0": { 1073 "name": "punctuation.definition.string.begin.elixir" 1074 } 1075 }, 1076 "end": "\\>[a-z]*", 1077 "endCaptures": { 1078 "0": { 1079 "name": "punctuation.definition.string.end.elixir" 1080 } 1081 }, 1082 "name": "string.quoted.single.elixir" 1083 }, 1084 { 1085 "comment": "Literal Character list sigil with curlies", 1086 "begin": "~C\\[", 1087 "beginCaptures": { 1088 "0": { 1089 "name": "punctuation.definition.string.begin.elixir" 1090 } 1091 }, 1092 "end": "\\][a-z]*", 1093 "endCaptures": { 1094 "0": { 1095 "name": "punctuation.definition.string.end.elixir" 1096 } 1097 }, 1098 "name": "string.quoted.single.elixir" 1099 }, 1100 { 1101 "comment": "Literal Character list sigil with curlies", 1102 "begin": "~C\\/", 1103 "beginCaptures": { 1104 "0": { 1105 "name": "punctuation.definition.string.begin.elixir" 1106 } 1107 }, 1108 "end": "\\/[a-z]*", 1109 "endCaptures": { 1110 "0": { 1111 "name": "punctuation.definition.string.end.elixir" 1112 } 1113 }, 1114 "name": "string.quoted.single.elixir" 1115 }, 1116 { 1117 "comment": "Literal Character list sigil with single quoted heredoc", 1118 "begin": "~C\\'\\'\\'", 1119 "beginCaptures": { 1120 "0": { 1121 "name": "punctuation.definition.string.begin.elixir" 1122 } 1123 }, 1124 "end": "\\'\\'\\'[a-z]*", 1125 "endCaptures": { 1126 "0": { 1127 "name": "punctuation.definition.string.end.elixir" 1128 } 1129 }, 1130 "name": "string.quoted.single.elixir" 1131 }, 1132 { 1133 "comment": "Literal Character list sigil with double quoted heredoc", 1134 "begin": "~C\\\"\\\"\\\"", 1135 "beginCaptures": { 1136 "0": { 1137 "name": "punctuation.definition.string.begin.elixir" 1138 } 1139 }, 1140 "end": "\\\"\\\"\\\"[a-z]*", 1141 "endCaptures": { 1142 "0": { 1143 "name": "punctuation.definition.string.end.elixir" 1144 } 1145 }, 1146 "name": "string.quoted.single.elixir" 1147 }, 1148 { 1149 "comment": "Literal Character list sigil with curlies", 1150 "begin": "~C\\'", 1151 "beginCaptures": { 1152 "0": { 1153 "name": "punctuation.definition.string.begin.elixir" 1154 } 1155 }, 1156 "end": "\\'[a-z]*", 1157 "endCaptures": { 1158 "0": { 1159 "name": "punctuation.definition.string.end.elixir" 1160 } 1161 }, 1162 "name": "string.quoted.single.elixir" 1163 }, 1164 { 1165 "comment": "Literal Character list sigil with curlies", 1166 "begin": "~C\\\"", 1167 "beginCaptures": { 1168 "0": { 1169 "name": "punctuation.definition.string.begin.elixir" 1170 } 1171 }, 1172 "end": "\\\"[a-z]*", 1173 "endCaptures": { 1174 "0": { 1175 "name": "punctuation.definition.string.end.elixir" 1176 } 1177 }, 1178 "name": "string.quoted.single.elixir" 1179 }, 1180 { 1181 "begin": "~w\\{", 1182 "beginCaptures": { 1183 "0": { 1184 "name": "punctuation.section.list.begin.elixir" 1185 } 1186 }, 1187 "comment": "sigil (allow for interpolation)", 1188 "end": "\\}[acs]*", 1189 "endCaptures": { 1190 "0": { 1191 "name": "punctuation.section.list.end.elixir" 1192 } 1193 }, 1194 "name": "string.quoted.double.interpolated.elixir", 1195 "patterns": [ 1196 { 1197 "include": "#interpolated_elixir" 1198 }, 1199 { 1200 "include": "#escaped_char" 1201 }, 1202 { 1203 "include": "#nest_curly" 1204 } 1205 ] 1206 }, 1207 { 1208 "begin": "~w\\[", 1209 "beginCaptures": { 1210 "0": { 1211 "name": "punctuation.section.list.begin.elixir" 1212 } 1213 }, 1214 "comment": "sigil (allow for interpolation)", 1215 "end": "\\][acs]*", 1216 "endCaptures": { 1217 "0": { 1218 "name": "punctuation.section.list.end.elixir" 1219 } 1220 }, 1221 "name": "string.quoted.double.interpolated.elixir", 1222 "patterns": [ 1223 { 1224 "include": "#interpolated_elixir" 1225 }, 1226 { 1227 "include": "#escaped_char" 1228 }, 1229 { 1230 "include": "#nest_brackets" 1231 } 1232 ] 1233 }, 1234 { 1235 "begin": "~w\\<", 1236 "beginCaptures": { 1237 "0": { 1238 "name": "punctuation.section.list.begin.elixir" 1239 } 1240 }, 1241 "comment": "sigil (allow for interpolation)", 1242 "end": "\\>[acs]*", 1243 "endCaptures": { 1244 "0": { 1245 "name": "punctuation.section.list.end.elixir" 1246 } 1247 }, 1248 "name": "string.quoted.double.interpolated.elixir", 1249 "patterns": [ 1250 { 1251 "include": "#interpolated_elixir" 1252 }, 1253 { 1254 "include": "#escaped_char" 1255 }, 1256 { 1257 "include": "#nest_ltgt" 1258 } 1259 ] 1260 }, 1261 { 1262 "begin": "~w\\(", 1263 "beginCaptures": { 1264 "0": { 1265 "name": "punctuation.section.list.begin.elixir" 1266 } 1267 }, 1268 "comment": "sigil (allow for interpolation)", 1269 "end": "\\)[acs]*", 1270 "endCaptures": { 1271 "0": { 1272 "name": "punctuation.section.list.end.elixir" 1273 } 1274 }, 1275 "name": "string.quoted.double.interpolated.elixir", 1276 "patterns": [ 1277 { 1278 "include": "#interpolated_elixir" 1279 }, 1280 { 1281 "include": "#escaped_char" 1282 }, 1283 { 1284 "include": "#nest_parens" 1285 } 1286 ] 1287 }, 1288 { 1289 "begin": "~w\\/", 1290 "beginCaptures": { 1291 "0": { 1292 "name": "punctuation.section.list.begin.elixir" 1293 } 1294 }, 1295 "comment": "sigil (allow for interpolation)", 1296 "end": "\\/[acs]*", 1297 "endCaptures": { 1298 "0": { 1299 "name": "punctuation.section.list.end.elixir" 1300 } 1301 }, 1302 "name": "string.quoted.double.interpolated.elixir", 1303 "patterns": [ 1304 { 1305 "include": "#interpolated_elixir" 1306 }, 1307 { 1308 "include": "#escaped_char" 1309 } 1310 ] 1311 }, 1312 { 1313 "begin": "~w\\|", 1314 "beginCaptures": { 1315 "0": { 1316 "name": "punctuation.section.list.begin.elixir" 1317 } 1318 }, 1319 "comment": "sigil (allow for interpolation)", 1320 "end": "\\|[acs]*", 1321 "endCaptures": { 1322 "0": { 1323 "name": "punctuation.section.list.end.elixir" 1324 } 1325 }, 1326 "name": "string.quoted.double.interpolated.elixir", 1327 "patterns": [ 1328 { 1329 "include": "#interpolated_elixir" 1330 }, 1331 { 1332 "include": "#escaped_char" 1333 } 1334 ] 1335 }, 1336 { 1337 "comment": "Interpolated word list sigil with single quoted heredoc", 1338 "begin": "~w\\'\\'\\'", 1339 "beginCaptures": { 1340 "0": { 1341 "name": "punctuation.section.list.begin.elixir" 1342 } 1343 }, 1344 "end": "\\'\\'\\'[acs]*", 1345 "endCaptures": { 1346 "0": { 1347 "name": "punctuation.section.list.end.elixir" 1348 } 1349 }, 1350 "name": "string.quoted.double.interpolated.elixir", 1351 "patterns": [ 1352 { 1353 "include": "#interpolated_elixir" 1354 }, 1355 { 1356 "include": "#escaped_char" 1357 } 1358 ] 1359 }, 1360 { 1361 "comment": "Interpolated word list sigil with double quoted heredoc", 1362 "begin": "~w\\\"\\\"\\\"", 1363 "beginCaptures": { 1364 "0": { 1365 "name": "punctuation.section.list.begin.elixir" 1366 } 1367 }, 1368 "end": "\\\"\\\"\\\"[acs]*", 1369 "endCaptures": { 1370 "0": { 1371 "name": "punctuation.section.list.end.elixir" 1372 } 1373 }, 1374 "name": "string.quoted.double.interpolated.elixir", 1375 "patterns": [ 1376 { 1377 "include": "#interpolated_elixir" 1378 }, 1379 { 1380 "include": "#escaped_char" 1381 } 1382 ] 1383 }, 1384 { 1385 "begin": "~w\\'", 1386 "beginCaptures": { 1387 "0": { 1388 "name": "punctuation.section.list.begin.elixir" 1389 } 1390 }, 1391 "comment": "sigil (allow for interpolation)", 1392 "end": "\\'[acs]*", 1393 "endCaptures": { 1394 "0": { 1395 "name": "punctuation.section.list.end.elixir" 1396 } 1397 }, 1398 "name": "string.quoted.double.interpolated.elixir", 1399 "patterns": [ 1400 { 1401 "include": "#interpolated_elixir" 1402 }, 1403 { 1404 "include": "#escaped_char" 1405 } 1406 ] 1407 }, 1408 { 1409 "begin": "~w\\\"", 1410 "beginCaptures": { 1411 "0": { 1412 "name": "punctuation.section.list.begin.elixir" 1413 } 1414 }, 1415 "comment": "sigil (allow for interpolation)", 1416 "end": "\\\"[acs]*", 1417 "endCaptures": { 1418 "0": { 1419 "name": "punctuation.section.list.end.elixir" 1420 } 1421 }, 1422 "name": "string.quoted.double.interpolated.elixir", 1423 "patterns": [ 1424 { 1425 "include": "#interpolated_elixir" 1426 }, 1427 { 1428 "include": "#escaped_char" 1429 } 1430 ] 1431 }, 1432 { 1433 "begin": "~W\\{", 1434 "beginCaptures": { 1435 "0": { 1436 "name": "punctuation.section.list.begin.elixir" 1437 } 1438 }, 1439 "comment": "sigil (without interpolation)", 1440 "end": "\\}[acs]*", 1441 "endCaptures": { 1442 "0": { 1443 "name": "punctuation.section.list.end.elixir" 1444 } 1445 }, 1446 "name": "string.quoted.double.literal.elixir" 1447 }, 1448 { 1449 "begin": "~W\\[", 1450 "beginCaptures": { 1451 "0": { 1452 "name": "punctuation.section.list.begin.elixir" 1453 } 1454 }, 1455 "comment": "sigil (without interpolation)", 1456 "end": "\\][acs]*", 1457 "endCaptures": { 1458 "0": { 1459 "name": "punctuation.section.list.end.elixir" 1460 } 1461 }, 1462 "name": "string.quoted.double.literal.elixir", 1463 "patterns": [ 1464 { 1465 "include": "#nest_brackets" 1466 } 1467 ] 1468 }, 1469 { 1470 "begin": "~W\\<", 1471 "beginCaptures": { 1472 "0": { 1473 "name": "punctuation.section.list.begin.elixir" 1474 } 1475 }, 1476 "comment": "sigil (without interpolation)", 1477 "end": "\\>[acs]*", 1478 "endCaptures": { 1479 "0": { 1480 "name": "punctuation.section.list.end.elixir" 1481 } 1482 }, 1483 "name": "string.quoted.double.literal.elixir", 1484 "patterns": [ 1485 { 1486 "include": "#nest_ltgt" 1487 } 1488 ] 1489 }, 1490 { 1491 "begin": "~W\\(", 1492 "beginCaptures": { 1493 "0": { 1494 "name": "punctuation.section.list.begin.elixir" 1495 } 1496 }, 1497 "comment": "sigil (without interpolation)", 1498 "end": "\\)[acs]*", 1499 "endCaptures": { 1500 "0": { 1501 "name": "punctuation.section.list.end.elixir" 1502 } 1503 }, 1504 "name": "string.quoted.double.literal.elixir", 1505 "patterns": [ 1506 { 1507 "include": "#nest_parens" 1508 } 1509 ] 1510 }, 1511 { 1512 "begin": "~W\\/", 1513 "beginCaptures": { 1514 "0": { 1515 "name": "punctuation.section.list.begin.elixir" 1516 } 1517 }, 1518 "comment": "sigil (without interpolation)", 1519 "end": "\\/[acs]*", 1520 "endCaptures": { 1521 "0": { 1522 "name": "punctuation.section.list.end.elixir" 1523 } 1524 }, 1525 "name": "string.quoted.double.literal.elixir" 1526 }, 1527 { 1528 "begin": "~W\\|", 1529 "beginCaptures": { 1530 "0": { 1531 "name": "punctuation.section.list.begin.elixir" 1532 } 1533 }, 1534 "comment": "sigil (without interpolation)", 1535 "end": "\\|[acs]*", 1536 "endCaptures": { 1537 "0": { 1538 "name": "punctuation.section.list.end.elixir" 1539 } 1540 }, 1541 "name": "string.quoted.double.literal.elixir" 1542 }, 1543 { 1544 "comment": "Literal word list sigil with single quoted heredoc", 1545 "begin": "~W\\'\\'\\'", 1546 "beginCaptures": { 1547 "0": { 1548 "name": "punctuation.section.list.begin.elixir" 1549 } 1550 }, 1551 "end": "\\'\\'\\'[acs]*", 1552 "endCaptures": { 1553 "0": { 1554 "name": "punctuation.section.list.end.elixir" 1555 } 1556 }, 1557 "name": "string.quoted.double.literal.elixir" 1558 }, 1559 { 1560 "comment": "Literal word list sigil with double quoted heredoc", 1561 "begin": "~W\\\"\\\"\\\"", 1562 "beginCaptures": { 1563 "0": { 1564 "name": "punctuation.section.list.begin.elixir" 1565 } 1566 }, 1567 "end": "\\\"\\\"\\\"[acs]*", 1568 "endCaptures": { 1569 "0": { 1570 "name": "punctuation.section.list.end.elixir" 1571 } 1572 }, 1573 "name": "string.quoted.double.literal.elixir" 1574 }, 1575 { 1576 "begin": "~W\\'", 1577 "beginCaptures": { 1578 "0": { 1579 "name": "punctuation.section.list.begin.elixir" 1580 } 1581 }, 1582 "comment": "sigil (without interpolation)", 1583 "end": "\\'[acs]*", 1584 "endCaptures": { 1585 "0": { 1586 "name": "punctuation.section.list.end.elixir" 1587 } 1588 }, 1589 "name": "string.quoted.double.literal.elixir" 1590 }, 1591 { 1592 "begin": "~W\\\"", 1593 "beginCaptures": { 1594 "0": { 1595 "name": "punctuation.section.list.begin.elixir" 1596 } 1597 }, 1598 "comment": "sigil (without interpolation)", 1599 "end": "\\\"[acs]*", 1600 "endCaptures": { 1601 "0": { 1602 "name": "punctuation.section.list.end.elixir" 1603 } 1604 }, 1605 "name": "string.quoted.double.literal.elixir" 1606 }, 1607 { 1608 "comment": "String Eex heredoc with double quotes", 1609 "begin": "\\s?(~E\"\"\")$", 1610 "beginCaptures": { 1611 "0": { 1612 "name": "punctuation.definition.string.begin.elixir" 1613 }, 1614 "1": { 1615 "name": "string.quoted.double.heredoc.elixir" 1616 } 1617 }, 1618 "end": "^\\s*(\"\"\"[a-z]*)$", 1619 "endCaptures": { 1620 "0": { 1621 "name": "punctuation.definition.string.end.elixir" 1622 }, 1623 "1": { 1624 "name": "string.quoted.double.heredoc.elixir" 1625 } 1626 }, 1627 "name": "text.html.elixir", 1628 "patterns": [ 1629 { 1630 "include": "text.html.elixir" 1631 } 1632 ] 1633 }, 1634 { 1635 "comment": "String Eex heredoc with double quotes", 1636 "begin": "\\s?(~e\"\"\")$", 1637 "beginCaptures": { 1638 "0": { 1639 "name": "punctuation.definition.string.begin.elixir" 1640 }, 1641 "1": { 1642 "name": "string.quoted.double.heredoc.elixir" 1643 } 1644 }, 1645 "end": "^\\s*(\"\"\"[a-z]*)$", 1646 "endCaptures": { 1647 "0": { 1648 "name": "punctuation.definition.string.end.elixir" 1649 }, 1650 "1": { 1651 "name": "string.quoted.double.heredoc.elixir" 1652 } 1653 }, 1654 "name": "text.html.elixir", 1655 "patterns": [ 1656 { 1657 "include": "text.html.elixir" 1658 } 1659 ] 1660 }, 1661 { 1662 "comment": "String Eex heredoc with single quotes", 1663 "begin": "\\s?(~E''')$", 1664 "beginCaptures": { 1665 "0": { 1666 "name": "punctuation.definition.string.begin.elixir" 1667 }, 1668 "1": { 1669 "name": "string.quoted.double.heredoc.elixir" 1670 } 1671 }, 1672 "end": "^\\s*('''[a-z]*)$", 1673 "endCaptures": { 1674 "0": { 1675 "name": "punctuation.definition.string.end.elixir" 1676 }, 1677 "1": { 1678 "name": "string.quoted.double.heredoc.elixir" 1679 } 1680 }, 1681 "name": "text.html.elixir", 1682 "patterns": [ 1683 { 1684 "include": "text.html.elixir" 1685 } 1686 ] 1687 }, 1688 { 1689 "comment": "String Eex heredoc with single quotes", 1690 "begin": "\\s?(~e''')$", 1691 "beginCaptures": { 1692 "0": { 1693 "name": "punctuation.definition.string.begin.elixir" 1694 }, 1695 "1": { 1696 "name": "string.quoted.double.heredoc.elixir" 1697 } 1698 }, 1699 "end": "^\\s*('''[a-z]*)$", 1700 "endCaptures": { 1701 "0": { 1702 "name": "punctuation.definition.string.end.elixir" 1703 }, 1704 "1": { 1705 "name": "string.quoted.double.heredoc.elixir" 1706 } 1707 }, 1708 "name": "text.html.elixir", 1709 "patterns": [ 1710 { 1711 "include": "text.html.elixir" 1712 } 1713 ] 1714 }, 1715 { 1716 "comment": "Embedded LiveView heredoc with double quotes", 1717 "begin": "\\s?(~L\"\"\")$", 1718 "beginCaptures": { 1719 "0": { 1720 "name": "punctuation.definition.string.begin.elixir" 1721 }, 1722 "1": { 1723 "name": "string.quoted.double.heredoc.elixir" 1724 } 1725 }, 1726 "end": "^\\s*(\"\"\"[a-z]*)$", 1727 "endCaptures": { 1728 "0": { 1729 "name": "punctuation.definition.string.end.elixir" 1730 }, 1731 "1": { 1732 "name": "string.quoted.double.heredoc.elixir" 1733 } 1734 }, 1735 "name": "text.html.elixir", 1736 "patterns": [ 1737 { 1738 "include": "text.html.elixir" 1739 } 1740 ] 1741 }, 1742 { 1743 "comment": "Embedded LiveView heredoc with double quotes", 1744 "begin": "\\s?(~l\"\"\")$", 1745 "beginCaptures": { 1746 "0": { 1747 "name": "punctuation.definition.string.begin.elixir" 1748 }, 1749 "1": { 1750 "name": "string.quoted.double.heredoc.elixir" 1751 } 1752 }, 1753 "end": "^\\s*(\"\"\"[a-z]*)$", 1754 "endCaptures": { 1755 "0": { 1756 "name": "punctuation.definition.string.end.elixir" 1757 }, 1758 "1": { 1759 "name": "string.quoted.double.heredoc.elixir" 1760 } 1761 }, 1762 "name": "text.html.elixir", 1763 "patterns": [ 1764 { 1765 "include": "text.html.elixir" 1766 } 1767 ] 1768 }, 1769 { 1770 "comment": "Embedded LiveView heredoc with single quotes", 1771 "begin": "\\s?(~L''')$", 1772 "beginCaptures": { 1773 "0": { 1774 "name": "punctuation.definition.string.begin.elixir" 1775 }, 1776 "1": { 1777 "name": "string.quoted.double.heredoc.elixir" 1778 } 1779 }, 1780 "end": "^\\s*('''[a-z]*)$", 1781 "endCaptures": { 1782 "0": { 1783 "name": "punctuation.definition.string.end.elixir" 1784 }, 1785 "1": { 1786 "name": "string.quoted.double.heredoc.elixir" 1787 } 1788 }, 1789 "name": "text.html.elixir", 1790 "patterns": [ 1791 { 1792 "include": "text.html.elixir" 1793 } 1794 ] 1795 }, 1796 { 1797 "comment": "Embedded LiveView heredoc with single quotes", 1798 "begin": "\\s?(~l''')$", 1799 "beginCaptures": { 1800 "0": { 1801 "name": "punctuation.definition.string.begin.elixir" 1802 }, 1803 "1": { 1804 "name": "string.quoted.double.heredoc.elixir" 1805 } 1806 }, 1807 "end": "^\\s*('''[a-z]*)$", 1808 "endCaptures": { 1809 "0": { 1810 "name": "punctuation.definition.string.end.elixir" 1811 }, 1812 "1": { 1813 "name": "string.quoted.double.heredoc.elixir" 1814 } 1815 }, 1816 "name": "text.html.elixir", 1817 "patterns": [ 1818 { 1819 "include": "text.html.elixir" 1820 } 1821 ] 1822 }, 1823 { 1824 "begin": "~[a-z](?>\"\"\")", 1825 "beginCaptures": { 1826 "0": { 1827 "name": "punctuation.definition.string.begin.elixir" 1828 } 1829 }, 1830 "comment": "Double-quoted heredocs sigils", 1831 "end": "^\\s*\"\"\"", 1832 "endCaptures": { 1833 "0": { 1834 "name": "punctuation.definition.string.end.elixir" 1835 } 1836 }, 1837 "name": "string.quoted.double.heredoc.elixir", 1838 "patterns": [ 1839 { 1840 "include": "#interpolated_elixir" 1841 }, 1842 { 1843 "include": "#escaped_char" 1844 } 1845 ] 1846 }, 1847 { 1848 "begin": "~[a-z](?>''')", 1849 "beginCaptures": { 1850 "0": { 1851 "name": "punctuation.definition.string.begin.elixir" 1852 } 1853 }, 1854 "comment": "Double-quoted heredocs sigils", 1855 "end": "^\\s*'''", 1856 "endCaptures": { 1857 "0": { 1858 "name": "punctuation.definition.string.end.elixir" 1859 } 1860 }, 1861 "name": "string.quoted.double.heredoc.elixir", 1862 "patterns": [ 1863 { 1864 "include": "#interpolated_elixir" 1865 }, 1866 { 1867 "include": "#escaped_char" 1868 } 1869 ] 1870 }, 1871 { 1872 "begin": "~[a-z]\\{", 1873 "beginCaptures": { 1874 "0": { 1875 "name": "punctuation.definition.string.begin.elixir" 1876 } 1877 }, 1878 "comment": "sigil (allow for interpolation)", 1879 "end": "\\}[a-z]*", 1880 "endCaptures": { 1881 "0": { 1882 "name": "punctuation.definition.string.end.elixir" 1883 } 1884 }, 1885 "name": "string.quoted.double.interpolated.elixir", 1886 "patterns": [ 1887 { 1888 "include": "#interpolated_elixir" 1889 }, 1890 { 1891 "include": "#escaped_char" 1892 }, 1893 { 1894 "include": "#nest_curly" 1895 } 1896 ] 1897 }, 1898 { 1899 "begin": "~[a-z]\\[", 1900 "beginCaptures": { 1901 "0": { 1902 "name": "punctuation.definition.string.begin.elixir" 1903 } 1904 }, 1905 "comment": "sigil (allow for interpolation)", 1906 "end": "\\][a-z]*", 1907 "endCaptures": { 1908 "0": { 1909 "name": "punctuation.definition.string.end.elixir" 1910 } 1911 }, 1912 "name": "string.quoted.double.interpolated.elixir", 1913 "patterns": [ 1914 { 1915 "include": "#interpolated_elixir" 1916 }, 1917 { 1918 "include": "#escaped_char" 1919 }, 1920 { 1921 "include": "#nest_brackets" 1922 } 1923 ] 1924 }, 1925 { 1926 "begin": "~[a-z]\\<", 1927 "beginCaptures": { 1928 "0": { 1929 "name": "punctuation.definition.string.begin.elixir" 1930 } 1931 }, 1932 "comment": "sigil (allow for interpolation)", 1933 "end": "\\>[a-z]*", 1934 "endCaptures": { 1935 "0": { 1936 "name": "punctuation.definition.string.end.elixir" 1937 } 1938 }, 1939 "name": "string.quoted.double.interpolated.elixir", 1940 "patterns": [ 1941 { 1942 "include": "#interpolated_elixir" 1943 }, 1944 { 1945 "include": "#escaped_char" 1946 }, 1947 { 1948 "include": "#nest_ltgt" 1949 } 1950 ] 1951 }, 1952 { 1953 "begin": "~[a-z]\\(", 1954 "beginCaptures": { 1955 "0": { 1956 "name": "punctuation.definition.string.begin.elixir" 1957 } 1958 }, 1959 "comment": "sigil (allow for interpolation)", 1960 "end": "\\)[a-z]*", 1961 "endCaptures": { 1962 "0": { 1963 "name": "punctuation.definition.string.end.elixir" 1964 } 1965 }, 1966 "name": "string.quoted.double.interpolated.elixir", 1967 "patterns": [ 1968 { 1969 "include": "#interpolated_elixir" 1970 }, 1971 { 1972 "include": "#escaped_char" 1973 }, 1974 { 1975 "include": "#nest_parens" 1976 } 1977 ] 1978 }, 1979 { 1980 "begin": "~[a-z]\\/", 1981 "beginCaptures": { 1982 "0": { 1983 "name": "punctuation.definition.string.begin.elixir" 1984 } 1985 }, 1986 "comment": "sigil (allow for interpolation)", 1987 "end": "\\/[a-z]*", 1988 "endCaptures": { 1989 "0": { 1990 "name": "punctuation.definition.string.end.elixir" 1991 } 1992 }, 1993 "name": "string.quoted.double.interpolated.elixir", 1994 "patterns": [ 1995 { 1996 "include": "#interpolated_elixir" 1997 }, 1998 { 1999 "include": "#escaped_char" 2000 } 2001 ] 2002 }, 2003 { 2004 "begin": "~[a-z]\\'", 2005 "beginCaptures": { 2006 "0": { 2007 "name": "punctuation.definition.string.begin.elixir" 2008 } 2009 }, 2010 "comment": "sigil (allow for interpolation)", 2011 "end": "\\'[a-z]*", 2012 "endCaptures": { 2013 "0": { 2014 "name": "punctuation.definition.string.end.elixir" 2015 } 2016 }, 2017 "name": "string.quoted.double.interpolated.elixir", 2018 "patterns": [ 2019 { 2020 "include": "#interpolated_elixir" 2021 }, 2022 { 2023 "include": "#escaped_char" 2024 } 2025 ] 2026 }, 2027 { 2028 "begin": "~[a-z]\\\"", 2029 "beginCaptures": { 2030 "0": { 2031 "name": "punctuation.definition.string.begin.elixir" 2032 } 2033 }, 2034 "comment": "sigil (allow for interpolation)", 2035 "end": "\\\"[a-z]*", 2036 "endCaptures": { 2037 "0": { 2038 "name": "punctuation.definition.string.end.elixir" 2039 } 2040 }, 2041 "name": "string.quoted.double.interpolated.elixir", 2042 "patterns": [ 2043 { 2044 "include": "#interpolated_elixir" 2045 }, 2046 { 2047 "include": "#escaped_char" 2048 } 2049 ] 2050 }, 2051 { 2052 "begin": "~[a-z]\\|", 2053 "beginCaptures": { 2054 "0": { 2055 "name": "punctuation.definition.string.begin.elixir" 2056 } 2057 }, 2058 "comment": "sigil (allow for interpolation)", 2059 "end": "\\|[a-z]*", 2060 "endCaptures": { 2061 "0": { 2062 "name": "punctuation.definition.string.end.elixir" 2063 } 2064 }, 2065 "name": "string.quoted.double.interpolated.elixir", 2066 "patterns": [ 2067 { 2068 "include": "#interpolated_elixir" 2069 }, 2070 { 2071 "include": "#escaped_char" 2072 } 2073 ] 2074 }, 2075 { 2076 "begin": "~[A-Z][A-Z0-9]*(?>\"\"\")", 2077 "beginCaptures": { 2078 "0": { 2079 "name": "punctuation.definition.string.begin.elixir" 2080 } 2081 }, 2082 "comment": "Double-quoted heredocs sigils", 2083 "end": "^\\s*\"\"\"", 2084 "endCaptures": { 2085 "0": { 2086 "name": "punctuation.definition.string.end.elixir" 2087 } 2088 }, 2089 "name": "string.quoted.other.literal.elixir" 2090 }, 2091 { 2092 "begin": "~[A-Z][A-Z0-9]*(?>''')", 2093 "beginCaptures": { 2094 "0": { 2095 "name": "punctuation.definition.string.begin.elixir" 2096 } 2097 }, 2098 "comment": "Double-quoted heredocs sigils", 2099 "end": "^\\s*'''", 2100 "endCaptures": { 2101 "0": { 2102 "name": "punctuation.definition.string.end.elixir" 2103 } 2104 }, 2105 "name": "string.quoted.other.literal.elixir" 2106 }, 2107 { 2108 "begin": "~[A-Z][A-Z0-9]*\\{", 2109 "beginCaptures": { 2110 "0": { 2111 "name": "punctuation.definition.string.begin.elixir" 2112 } 2113 }, 2114 "comment": "sigil (without interpolation)", 2115 "end": "\\}[a-z]*", 2116 "endCaptures": { 2117 "0": { 2118 "name": "punctuation.definition.string.end.elixir" 2119 } 2120 }, 2121 "name": "string.quoted.double.literal.elixir" 2122 }, 2123 { 2124 "begin": "~[A-Z][A-Z0-9]*\\[", 2125 "beginCaptures": { 2126 "0": { 2127 "name": "punctuation.definition.string.begin.elixir" 2128 } 2129 }, 2130 "comment": "sigil (without interpolation)", 2131 "end": "\\][a-z]*", 2132 "endCaptures": { 2133 "0": { 2134 "name": "punctuation.definition.string.end.elixir" 2135 } 2136 }, 2137 "name": "string.quoted.double.literal.elixir", 2138 "patterns": [ 2139 { 2140 "include": "#nest_brackets" 2141 } 2142 ] 2143 }, 2144 { 2145 "begin": "~[A-Z][A-Z0-9]*\\<", 2146 "beginCaptures": { 2147 "0": { 2148 "name": "punctuation.definition.string.begin.elixir" 2149 } 2150 }, 2151 "comment": "sigil (without interpolation)", 2152 "end": "\\>[a-z]*", 2153 "endCaptures": { 2154 "0": { 2155 "name": "punctuation.definition.string.end.elixir" 2156 } 2157 }, 2158 "name": "string.quoted.double.literal.elixir", 2159 "patterns": [ 2160 { 2161 "include": "#nest_ltgt" 2162 } 2163 ] 2164 }, 2165 { 2166 "begin": "~[A-Z][A-Z0-9]*\\(", 2167 "beginCaptures": { 2168 "0": { 2169 "name": "punctuation.definition.string.begin.elixir" 2170 } 2171 }, 2172 "comment": "sigil (without interpolation)", 2173 "end": "\\)[a-z]*", 2174 "endCaptures": { 2175 "0": { 2176 "name": "punctuation.definition.string.end.elixir" 2177 } 2178 }, 2179 "name": "string.quoted.double.literal.elixir", 2180 "patterns": [ 2181 { 2182 "include": "#nest_parens" 2183 } 2184 ] 2185 }, 2186 { 2187 "begin": "~[A-Z][A-Z0-9]*\\/", 2188 "beginCaptures": { 2189 "0": { 2190 "name": "punctuation.definition.string.begin.elixir" 2191 } 2192 }, 2193 "comment": "sigil (without interpolation)", 2194 "end": "\\/[a-z]*", 2195 "endCaptures": { 2196 "0": { 2197 "name": "punctuation.definition.string.end.elixir" 2198 } 2199 }, 2200 "name": "string.quoted.double.literal.elixir" 2201 }, 2202 { 2203 "begin": "~[A-Z][A-Z0-9]*\\'", 2204 "beginCaptures": { 2205 "0": { 2206 "name": "punctuation.definition.string.begin.elixir" 2207 } 2208 }, 2209 "comment": "sigil (without interpolation)", 2210 "end": "\\'[a-z]*", 2211 "endCaptures": { 2212 "0": { 2213 "name": "punctuation.definition.string.end.elixir" 2214 } 2215 }, 2216 "name": "string.quoted.double.literal.elixir" 2217 }, 2218 { 2219 "begin": "~[A-Z][A-Z0-9]*\\\"", 2220 "beginCaptures": { 2221 "0": { 2222 "name": "punctuation.definition.string.begin.elixir" 2223 } 2224 }, 2225 "comment": "sigil (without interpolation)", 2226 "end": "\\\"[a-z]*", 2227 "endCaptures": { 2228 "0": { 2229 "name": "punctuation.definition.string.end.elixir" 2230 } 2231 }, 2232 "name": "string.quoted.double.literal.elixir" 2233 }, 2234 { 2235 "begin": "~[A-Z][A-Z0-9]*\\|", 2236 "beginCaptures": { 2237 "0": { 2238 "name": "punctuation.definition.string.begin.elixir" 2239 } 2240 }, 2241 "comment": "sigil (without interpolation)", 2242 "end": "\\|[a-z]*", 2243 "endCaptures": { 2244 "0": { 2245 "name": "punctuation.definition.string.end.elixir" 2246 } 2247 }, 2248 "name": "string.quoted.double.literal.elixir" 2249 }, 2250 { 2251 "begin": ":'", 2252 "captures": { 2253 "0": { 2254 "name": "punctuation.definition.constant.elixir" 2255 } 2256 }, 2257 "end": "'", 2258 "name": "constant.language.symbol.single-quoted.elixir", 2259 "patterns": [ 2260 { 2261 "include": "#interpolated_elixir" 2262 }, 2263 { 2264 "include": "#escaped_char" 2265 } 2266 ] 2267 }, 2268 { 2269 "comment": "symbols with single-quoted string, used as keys in Keyword lists.", 2270 "match": "(')((?:[^'\\\\]*(?:\\\\.[^'\\\\]*)*))(':)(?!:)", 2271 "name": "constant.language.symbol.single-quoted.elixir", 2272 "captures": { 2273 "1": { 2274 "name": "punctuation.definition.constant.elixir" 2275 }, 2276 "2": { 2277 "patterns": [ 2278 { 2279 "include": "#interpolated_elixir" 2280 }, 2281 { 2282 "include": "#escaped_char" 2283 } 2284 ] 2285 }, 2286 "3": { 2287 "name": "punctuation.definition.constant.elixir" 2288 } 2289 } 2290 }, 2291 { 2292 "begin": ":\"", 2293 "captures": { 2294 "0": { 2295 "name": "punctuation.definition.constant.elixir" 2296 } 2297 }, 2298 "end": "\"", 2299 "name": "constant.language.symbol.double-quoted.elixir", 2300 "patterns": [ 2301 { 2302 "include": "#interpolated_elixir" 2303 }, 2304 { 2305 "include": "#escaped_char" 2306 } 2307 ] 2308 }, 2309 { 2310 "begin": "(?>''')", 2311 "beginCaptures": { 2312 "0": { 2313 "name": "punctuation.definition.string.begin.elixir" 2314 } 2315 }, 2316 "comment": "Single-quoted heredocs", 2317 "end": "^\\s*'''", 2318 "endCaptures": { 2319 "0": { 2320 "name": "punctuation.definition.string.end.elixir" 2321 } 2322 }, 2323 "name": "string.quoted.single.heredoc.elixir", 2324 "patterns": [ 2325 { 2326 "include": "#interpolated_elixir" 2327 }, 2328 { 2329 "include": "#escaped_char" 2330 } 2331 ] 2332 }, 2333 { 2334 "begin": "'", 2335 "beginCaptures": { 2336 "0": { 2337 "name": "punctuation.definition.string.begin.elixir" 2338 } 2339 }, 2340 "comment": "single quoted string (allows for interpolation)", 2341 "end": "'", 2342 "endCaptures": { 2343 "0": { 2344 "name": "punctuation.definition.string.end.elixir" 2345 } 2346 }, 2347 "name": "string.quoted.single.elixir", 2348 "patterns": [ 2349 { 2350 "include": "#interpolated_elixir" 2351 }, 2352 { 2353 "include": "#escaped_char" 2354 } 2355 ] 2356 }, 2357 { 2358 "begin": "(?>\"\"\")", 2359 "beginCaptures": { 2360 "0": { 2361 "name": "punctuation.definition.string.begin.elixir" 2362 } 2363 }, 2364 "comment": "Double-quoted heredocs", 2365 "end": "^\\s*\"\"\"", 2366 "endCaptures": { 2367 "0": { 2368 "name": "punctuation.definition.string.end.elixir" 2369 } 2370 }, 2371 "name": "string.quoted.double.heredoc.elixir", 2372 "patterns": [ 2373 { 2374 "include": "#interpolated_elixir" 2375 }, 2376 { 2377 "include": "#escaped_char" 2378 } 2379 ] 2380 }, 2381 { 2382 "comment": "symbols defined by double-quoted string, used as keys in Keyword lists.", 2383 "match": "(\")((?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*))(\":)(?!:)", 2384 "name": "constant.language.symbol.double-quoted.elixir", 2385 "captures": { 2386 "1": { 2387 "name": "punctuation.definition.constant.elixir" 2388 }, 2389 "2": { 2390 "patterns": [ 2391 { 2392 "include": "#interpolated_elixir" 2393 }, 2394 { 2395 "include": "#escaped_char" 2396 } 2397 ] 2398 }, 2399 "3": { 2400 "name": "punctuation.definition.constant.elixir" 2401 } 2402 } 2403 }, 2404 { 2405 "begin": "\"", 2406 "beginCaptures": { 2407 "0": { 2408 "name": "punctuation.definition.string.begin.elixir" 2409 } 2410 }, 2411 "comment": "double quoted string (allows for interpolation)", 2412 "end": "\"", 2413 "endCaptures": { 2414 "0": { 2415 "name": "punctuation.definition.string.end.elixir" 2416 } 2417 }, 2418 "name": "string.quoted.double.elixir", 2419 "patterns": [ 2420 { 2421 "include": "#interpolated_elixir" 2422 }, 2423 { 2424 "include": "#escaped_char" 2425 } 2426 ] 2427 }, 2428 { 2429 "begin": "#", 2430 "beginCaptures": { 2431 "0": { 2432 "name": "punctuation.definition.comment.elixir" 2433 } 2434 }, 2435 "end": "\\n", 2436 "name": "comment.line.number-sign.elixir" 2437 }, 2438 { 2439 "match": "\\b_([\\w]+[?!]?)", 2440 "name": "comment.unused.elixir" 2441 }, 2442 { 2443 "match": "\\b_\\b", 2444 "name": "comment.wildcard.elixir" 2445 }, 2446 { 2447 "comment": "matches question mark letters.\n\nexamples (1st alternation = hex):\n?\\x1 ?\\x61\n\nexamples (2nd alternation = octal):\n?\\0 ?\\07 ?\\017\n\nexamples (3rd alternation = escaped):\n?\\n ?\\b\n\nexamples (4th alternation = meta-ctrl):\n?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\nexamples (4th alternation = normal):\n?a ?A ?0\n?* ?\" ?(\n?. ?#\n\n\nthe negative lookbehind prevents against matching\np(42.tainted?)", 2448 "match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])", 2449 "name": "constant.numeric.elixir" 2450 }, 2451 { 2452 "match": "(\\|\\|\\||&&&|\\^\\^\\^|<<<|>>>|~~~)", 2453 "name": "keyword.operator.bitwise.elixir" 2454 }, 2455 { 2456 "comment": "matches: <<~ ~>>", 2457 "match": "~>>|<\\<\\~", 2458 "name": "keyword.operator.other.unbalanced.elixir" 2459 }, 2460 { 2461 "comment": "matches: | ++ -- ** \\ <- <> << >> :: .. ... |> => -> <|> <~> <~ ~>", 2462 "match": "\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.\\.?|\\|>|=>|<\\|\\>|<~>|->|~>|<~|(?<!\\|)\\|(?!\\|)", 2463 "name": "keyword.operator.other.elixir" 2464 }, 2465 { 2466 "match": "===?|!==?|<=?|>=?|=~", 2467 "name": "keyword.operator.comparison.elixir" 2468 }, 2469 { 2470 "match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b", 2471 "name": "keyword.operator.logical.elixir" 2472 }, 2473 { 2474 "match": "(\\^)", 2475 "name": "keyword.operator.other.elixir" 2476 }, 2477 { 2478 "match": "(\\*|\\+|\\-|/)", 2479 "name": "keyword.operator.arithmetic.elixir" 2480 }, 2481 { 2482 "match": "=", 2483 "name": "keyword.operator.assignment.elixir" 2484 }, 2485 { 2486 "match": "\\;", 2487 "name": "punctuation.separator.statement.elixir" 2488 }, 2489 { 2490 "match": ",", 2491 "name": "punctuation.separator.object.elixir" 2492 }, 2493 { 2494 "match": "\\.", 2495 "name": "punctuation.separator.method.elixir" 2496 }, 2497 { 2498 "match": "%", 2499 "name": "punctuation.definition.map.elixir" 2500 }, 2501 { 2502 "match": "\\{|\\}", 2503 "name": "punctuation.section.scope.elixir" 2504 }, 2505 { 2506 "match": "\\[\\]|\\[|\\]", 2507 "name": "punctuation.section.array.elixir" 2508 }, 2509 { 2510 "match": "\\(|\\)", 2511 "name": "punctuation.section.function.elixir" 2512 }, 2513 { 2514 "match": "(@)([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)", 2515 "name": "variable.other.constant.elixir", 2516 "captures": { 2517 "1": { 2518 "name": "punctuation.definition.variable.elixir" 2519 } 2520 } 2521 }, 2522 { 2523 "match": "([_\\p{Ll}\\p{Lo}][\\p{L}\\p{N}_]*[?!]?)", 2524 "name": "variable.other.readwrite.elixir" 2525 }, 2526 { 2527 "match": "(&)\\d+", 2528 "name": "variable.other.anonymous.elixir" 2529 }, 2530 { 2531 "match": "(&)", 2532 "name": "keyword.operator.other.elixir" 2533 }, 2534 { 2535 "captures": { 2536 "1": { 2537 "name": "punctuation.definition.constant.elixir" 2538 } 2539 }, 2540 "comment": "Atom", 2541 "match": "(?<!:)(:)(?:<<<|<<>>|<<~|<~>|<>|<=|<-|<~|<|>>>|>=|>|\\+\\+\\+|\\+\\+|\\+|---|--|->|-|\\*\\*|\\*|\\|\\|\\||\\|\\||\\|>|\\||%{}|%|&&&|&&|&|===|==|=~|=>|=|!==|!=|!|\\.\\.|\\.|~>>|~>|\\^|{}|@|\\/|\\\\\\\\|[\\p{L}_][\\p{L}\\p{N}_@]*[?!]?)", 2542 "name": "constant.language.symbol.elixir" 2543 }, 2544 { 2545 "match": ":", 2546 "name": "punctuation.separator.other.elixir" 2547 } 2548 ], 2549 "repository": { 2550 "escaped_char": { 2551 "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)", 2552 "name": "constant.character.escape.elixir" 2553 }, 2554 "interpolated_elixir": { 2555 "patterns": [ 2556 { 2557 "captures": { 2558 "0": { 2559 "name": "punctuation.section.embedded.elixir" 2560 }, 2561 "1": { 2562 "name": "meta.embedded.line.empty.elixir" 2563 } 2564 }, 2565 "match": "#\\{(\\})", 2566 "name": "meta.embedded.line.elixir" 2567 }, 2568 { 2569 "begin": "#\\{", 2570 "captures": { 2571 "0": { 2572 "name": "punctuation.section.embedded.elixir" 2573 } 2574 }, 2575 "end": "\\}", 2576 "name": "meta.embedded.line.elixir", 2577 "patterns": [ 2578 { 2579 "include": "#nest_curly_and_self" 2580 }, 2581 { 2582 "include": "$self" 2583 } 2584 ] 2585 } 2586 ] 2587 }, 2588 "nest_brackets": { 2589 "begin": "\\[", 2590 "captures": { 2591 "0": { 2592 "name": "punctuation.section.scope.elixir" 2593 } 2594 }, 2595 "end": "\\]", 2596 "patterns": [ 2597 { 2598 "include": "#nest_brackets" 2599 } 2600 ] 2601 }, 2602 "nest_curly": { 2603 "begin": "\\{", 2604 "captures": { 2605 "0": { 2606 "name": "punctuation.section.scope.elixir" 2607 } 2608 }, 2609 "end": "\\}", 2610 "patterns": [ 2611 { 2612 "include": "#nest_curly" 2613 } 2614 ] 2615 }, 2616 "nest_curly_and_self": { 2617 "patterns": [ 2618 { 2619 "begin": "\\{", 2620 "captures": { 2621 "0": { 2622 "name": "punctuation.section.scope.elixir" 2623 } 2624 }, 2625 "end": "\\}", 2626 "patterns": [ 2627 { 2628 "include": "#nest_curly_and_self" 2629 } 2630 ] 2631 }, 2632 { 2633 "include": "$self" 2634 } 2635 ] 2636 }, 2637 "nest_ltgt": { 2638 "begin": "\\<", 2639 "captures": { 2640 "0": { 2641 "name": "punctuation.section.scope.elixir" 2642 } 2643 }, 2644 "end": "\\>", 2645 "patterns": [ 2646 { 2647 "include": "#nest_ltgt" 2648 } 2649 ] 2650 }, 2651 "nest_parens": { 2652 "begin": "\\(", 2653 "captures": { 2654 "0": { 2655 "name": "punctuation.section.scope.elixir" 2656 } 2657 }, 2658 "end": "\\)", 2659 "patterns": [ 2660 { 2661 "include": "#nest_parens" 2662 } 2663 ] 2664 }, 2665 "regex_sub": { 2666 "name": "string.interpolated.regexp.elixir", 2667 "patterns": [ 2668 { 2669 "include": "#interpolated_elixir" 2670 }, 2671 { 2672 "include": "#escaped_char" 2673 }, 2674 { 2675 "name": "string.regexp.arbitrary-repitition.elixir", 2676 "match": "(\\{)\\d+(,\\d+)?(\\})", 2677 "captures": { 2678 "1": { 2679 "name": "punctuation.definition.arbitrary-repitition.elixir" 2680 }, 2681 "3": { 2682 "name": "punctuation.definition.arbitrary-repitition.elixir" 2683 } 2684 } 2685 }, 2686 { 2687 "name": "string.regexp.character-class.elixir", 2688 "begin": "\\[(?:\\^?\\])?", 2689 "end": "\\]", 2690 "captures": { 2691 "0": { 2692 "name": "punctuation.definition.character-class.elixir" 2693 } 2694 }, 2695 "patterns": [ 2696 { 2697 "include": "#escaped_char" 2698 } 2699 ] 2700 }, 2701 { 2702 "begin": "\\(", 2703 "captures": { 2704 "0": { 2705 "name": "punctuation.definition.group.elixir" 2706 } 2707 }, 2708 "end": "\\)", 2709 "name": "string.regexp.group.elixir", 2710 "patterns": [ 2711 { 2712 "include": "#regex_sub" 2713 } 2714 ] 2715 }, 2716 { 2717 "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", 2718 "beginCaptures": { 2719 "1": { 2720 "name": "punctuation.definition.comment.elixir" 2721 } 2722 }, 2723 "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", 2724 "end": "$\\n?", 2725 "endCaptures": { 2726 "0": { 2727 "name": "punctuation.definition.comment.elixir" 2728 } 2729 }, 2730 "name": "comment.line.number-sign.elixir" 2731 } 2732 ] 2733 } 2734 }, 2735 "scopeName": "source.elixir" 2736 } 2737