tm-grammars 1.17.4 → 1.17.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +86 -86
  2. package/grammars/actionscript-3.json +12 -12
  3. package/grammars/angular-expression.json +20 -20
  4. package/grammars/angular-let-declaration.json +1 -1
  5. package/grammars/angular-ts.json +244 -244
  6. package/grammars/apex.json +61 -61
  7. package/grammars/apl.json +8 -8
  8. package/grammars/applescript.json +1 -1
  9. package/grammars/ara.json +6 -6
  10. package/grammars/asm.json +10 -10
  11. package/grammars/astro.json +2 -2
  12. package/grammars/ballerina.json +72 -72
  13. package/grammars/bicep.json +5 -5
  14. package/grammars/blade.json +16 -16
  15. package/grammars/c.json +11 -11
  16. package/grammars/clarity.json +25 -25
  17. package/grammars/codeql.json +182 -182
  18. package/grammars/coffee.json +9 -9
  19. package/grammars/common-lisp.json +2 -2
  20. package/grammars/cpp.json +3 -3
  21. package/grammars/crystal.json +4 -4
  22. package/grammars/csharp.json +93 -93
  23. package/grammars/css.json +15 -15
  24. package/grammars/dax.json +7 -7
  25. package/grammars/dream-maker.json +6 -6
  26. package/grammars/elixir.json +1 -1
  27. package/grammars/emacs-lisp.json +74 -74
  28. package/grammars/fsharp.json +48 -48
  29. package/grammars/gdscript.json +12 -12
  30. package/grammars/gleam.json +5 -5
  31. package/grammars/glimmer-js.json +1 -1
  32. package/grammars/glimmer-ts.json +1 -1
  33. package/grammars/gnuplot.json +1 -1
  34. package/grammars/go.json +1 -1
  35. package/grammars/groovy.json +2 -2
  36. package/grammars/hack.json +8 -8
  37. package/grammars/haskell.json +64 -62
  38. package/grammars/haxe.json +1 -1
  39. package/grammars/hcl.json +4 -4
  40. package/grammars/html.json +1 -1
  41. package/grammars/imba.json +57 -57
  42. package/grammars/java.json +5 -5
  43. package/grammars/javascript.json +252 -252
  44. package/grammars/jison.json +7 -7
  45. package/grammars/json.json +2 -2
  46. package/grammars/jsonc.json +2 -2
  47. package/grammars/jsonl.json +2 -2
  48. package/grammars/jsx.json +252 -252
  49. package/grammars/julia.json +20 -20
  50. package/grammars/lean.json +1 -1
  51. package/grammars/less.json +8 -8
  52. package/grammars/markdown.json +5 -5
  53. package/grammars/marko.json +1 -1
  54. package/grammars/matlab.json +7 -7
  55. package/grammars/mdc.json +6 -6
  56. package/grammars/mdx.json +2 -2
  57. package/grammars/mojo.json +93 -93
  58. package/grammars/narrat.json +2 -2
  59. package/grammars/nim.json +5 -5
  60. package/grammars/objective-c.json +7 -7
  61. package/grammars/objective-cpp.json +13 -13
  62. package/grammars/ocaml.json +93 -93
  63. package/grammars/php.json +10 -10
  64. package/grammars/puppet.json +4 -4
  65. package/grammars/purescript.json +1 -1
  66. package/grammars/python.json +92 -92
  67. package/grammars/r.json +5 -5
  68. package/grammars/racket.json +18 -15
  69. package/grammars/razor.json +15 -15
  70. package/grammars/regexp.json +8 -8
  71. package/grammars/rel.json +1 -1
  72. package/grammars/riscv.json +1 -1
  73. package/grammars/ruby.json +4 -4
  74. package/grammars/scala.json +2 -2
  75. package/grammars/scheme.json +11 -11
  76. package/grammars/scss.json +4 -4
  77. package/grammars/shellsession.json +1 -1
  78. package/grammars/stylus.json +4 -4
  79. package/grammars/svelte.json +6 -6
  80. package/grammars/swift.json +32 -32
  81. package/grammars/system-verilog.json +1 -1
  82. package/grammars/terraform.json +4 -4
  83. package/grammars/toml.json +3 -3
  84. package/grammars/tsx.json +252 -252
  85. package/grammars/twig.json +4 -4
  86. package/grammars/typescript.json +244 -244
  87. package/grammars/typespec.json +30 -30
  88. package/grammars/typst.json +11 -11
  89. package/grammars/vhdl.json +37 -37
  90. package/grammars/vue.json +2 -2
  91. package/grammars/vyper.json +112 -112
  92. package/grammars/wolfram.json +329 -329
  93. package/grammars/yaml.json +17 -17
  94. package/index.js +91 -91
  95. package/package.json +1 -1
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "repository": {
13
13
  "annotated-parameter": {
14
- "begin": "(?x)\n\\b\n([[:alpha:]_]\\w*) \\s* (:)\n",
14
+ "begin": "\\b([A-Za-z_]\\w*)\\s*(:)",
15
15
  "beginCaptures": {
16
16
  "1": {
17
17
  "name": "variable.parameter.function.language.python"
@@ -37,7 +37,7 @@
37
37
  ]
38
38
  },
39
39
  "assignment-operator": {
40
- "match": "(?x)\n<<= | >>= | //= | \\*\\*=\n| \\+= | -= | /= | @=\n| \\*= | %= | ~= | \\^= | &= | \\|=\n| =(?!=)\n",
40
+ "match": "<<=|>>=|//=|\\*\\*=|\\+=|-=|/=|@=|\\*=|%=|~=|\\^=|&=|\\|=|=(?!=)",
41
41
  "name": "keyword.operator.assignment.python"
42
42
  },
43
43
  "backticks": {
@@ -65,17 +65,17 @@
65
65
  ]
66
66
  },
67
67
  "builtin-exceptions": {
68
- "match": "(?x) (?<!\\.) \\b(\n(\nArithmetic | Assertion | Attribute | Buffer | BlockingIO\n| BrokenPipe | ChildProcess\n| (Connection (Aborted | Refused | Reset)?)\n| EOF | Environment | FileExists | FileNotFound\n| FloatingPoint | IO | Import | Indentation | Index | Interrupted\n| IsADirectory | NotADirectory | Permission | ProcessLookup\n| Timeout\n| Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n| Reference | Runtime | Recursion | Syntax | System\n| Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n| Value | Windows | ZeroDivision | ModuleNotFound\n) Error\n|\n((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n| Unicode | Bytes | Resource\n)? Warning\n|\nSystemExit | Stop(Async)?Iteration\n| KeyboardInterrupt\n| GeneratorExit | (Base)?Exception\n)\\b\n",
68
+ "match": "(?<!\\.)\\b((Arithmetic|Assertion|Attribute|Buffer|BlockingIO|BrokenPipe|ChildProcess|(Connection(Aborted|Refused|Reset)?)|EOF|Environment|FileExists|FileNotFound|FloatingPoint|IO|Import|Indentation|Index|Interrupted|IsADirectory|NotADirectory|Permission|ProcessLookup|Timeout|Key|Lookup|Memory|Name|NotImplemented|OS|Overflow|Reference|Runtime|Recursion|Syntax|System|Tab|Type|UnboundLocal|Unicode(Encode|Decode|Translate)?|Value|Windows|ZeroDivision|ModuleNotFound)Error|((Pending)?Deprecation|Runtime|Syntax|User|Future|Import|Unicode|Bytes|Resource)?Warning|SystemExit|Stop(Async)?Iteration|KeyboardInterrupt|GeneratorExit|(Base)?Exception)\\b",
69
69
  "name": "support.type.exception.python"
70
70
  },
71
71
  "builtin-functions": {
72
72
  "patterns": [
73
73
  {
74
- "match": "(?x)\n(?<!\\.) \\b(\n__import__ | abs | aiter | all | any | anext | ascii | bin\n| breakpoint | callable | chr | compile | copyright | credits\n| delattr | dir | divmod | enumerate | eval | exec | exit\n| filter | format | getattr | globals | hasattr | hash | help\n| hex | id | input | isinstance | issubclass | iter | len\n| license | locals | map | max | memoryview | min | next\n| oct | open | ord | pow | print | quit | range | reload | repr\n| reversed | round | setattr | sorted | sum | vars | zip\n)\\b\n",
74
+ "match": "(?<!\\.)\\b(__import__|abs|aiter|all|any|anext|ascii|bin|breakpoint|callable|chr|compile|copyright|credits|delattr|dir|divmod|enumerate|eval|exec|exit|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|license|locals|map|max|memoryview|min|next|oct|open|ord|pow|print|quit|range|reload|repr|reversed|round|setattr|sorted|sum|vars|zip)\\b",
75
75
  "name": "support.function.builtin.python"
76
76
  },
77
77
  {
78
- "match": "(?x)\n(?<!\\.) \\b(\nfile | reduce | intern | raw_input | unicode | cmp | basestring\n| execfile | long | xrange\n)\\b\n",
78
+ "match": "(?<!\\.)\\b(file|reduce|intern|raw_input|unicode|cmp|basestring|execfile|long|xrange)\\b",
79
79
  "name": "variable.legacy.builtin.python"
80
80
  }
81
81
  ]
@@ -91,11 +91,11 @@
91
91
  ]
92
92
  },
93
93
  "builtin-types": {
94
- "match": "(?x)\n(?<!\\.) \\b(\n__mlir_attr | __mlir_op | __mlir_type | bool | bytearray | bytes | classmethod | complex | dict\n| float | frozenset | int | list | object | property\n| set | slice | staticmethod | str | tuple | type\n\n(?# Although 'super' is not a type, it's related to types,\nand is special enough to be highlighted differently from\nother built-ins)\n| super\n)\\b\n",
94
+ "match": "(?<!\\.)\\b(__mlir_attr|__mlir_op|__mlir_type|bool|bytearray|bytes|classmethod|complex|dict|float|frozenset|int|list|object|property|set|slice|staticmethod|str|tuple|type(?#Although'super'isnotatype,it'srelatedtotypes,andisspecialenoughtobehighlighteddifferentlyfromotherbuilt-ins)|super)\\b",
95
95
  "name": "support.type.python"
96
96
  },
97
97
  "call-wrapper-inheritance": {
98
- "begin": "(?x)\n\\b(?=\n([[:alpha:]_]\\w*) \\s* (\\()\n)\n",
98
+ "begin": "\\b(?=([A-Za-z_]\\w*)\\s*(\\())",
99
99
  "comment": "same as a function call, but in inheritance context",
100
100
  "end": "(\\))",
101
101
  "endCaptures": {
@@ -116,7 +116,7 @@
116
116
  "class-declaration": {
117
117
  "patterns": [
118
118
  {
119
- "begin": "(?x)\n\\s*(class|struct|trait)\\s+\n(?=\n[[:alpha:]_]\\w* \\s* (:|\\()\n)\n",
119
+ "begin": "\\s*(class|struct|trait)\\s+(?=[A-Za-z_]\\w*\\s*(:|\\())",
120
120
  "beginCaptures": {
121
121
  "1": {
122
122
  "name": "storage.type.class.python"
@@ -200,7 +200,7 @@
200
200
  "name": "keyword.operator.assignment.python"
201
201
  }
202
202
  },
203
- "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)\n"
203
+ "match": "\\b([A-Za-z_]\\w*)\\s*(=)(?!=)"
204
204
  },
205
205
  "class-name": {
206
206
  "patterns": [
@@ -211,7 +211,7 @@
211
211
  "include": "#builtin-possible-callables"
212
212
  },
213
213
  {
214
- "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\b\n",
214
+ "match": "\\b([A-Za-z_]\\w*)\\b",
215
215
  "name": "entity.name.type.class.python"
216
216
  }
217
217
  ]
@@ -227,7 +227,7 @@
227
227
  "comments": {
228
228
  "patterns": [
229
229
  {
230
- "begin": "(?x)\n(?:\n\\# \\s* (type:)\n\\s*+ (?# we want `\\s*+` which is possessive quantifier since\nwe do not actually want to backtrack when matching\nwhitespace here)\n(?! $ | \\#)\n)\n",
230
+ "begin": "(?:\\#\\s*(type:)\\s*+(?#wewant`\\s*+`whichispossessivequantifiersincewedonotactuallywanttobacktrackwhenmatchingwhitespacehere)(?!$|\\#))",
231
231
  "beginCaptures": {
232
232
  "0": {
233
233
  "name": "meta.typehint.comment.python"
@@ -241,11 +241,11 @@
241
241
  "name": "comment.line.number-sign.python",
242
242
  "patterns": [
243
243
  {
244
- "match": "(?x)\n\\G ignore\n(?= \\s* (?: $ | \\#))\n",
244
+ "match": "\\Gignore(?=\\s*(?:$|\\#))",
245
245
  "name": "comment.typehint.ignore.notation.python"
246
246
  },
247
247
  {
248
- "match": "(?x)\n(?<!\\.)\\b(\nbool | bytes | float | int | object | str\n| List | Dict | Iterable | Sequence | Set\n| FrozenSet | Callable | Union | Tuple\n| Any | None\n)\\b\n",
248
+ "match": "(?<!\\.)\\b(bool|bytes|float|int|object|str|List|Dict|Iterable|Sequence|Set|FrozenSet|Callable|Union|Tuple|Any|None)\\b",
249
249
  "name": "comment.typehint.type.notation.python"
250
250
  },
251
251
  {
@@ -253,7 +253,7 @@
253
253
  "name": "comment.typehint.punctuation.notation.python"
254
254
  },
255
255
  {
256
- "match": "([[:alpha:]_]\\w*)",
256
+ "match": "([A-Za-z_]\\w*)",
257
257
  "name": "comment.typehint.variable.notation.python"
258
258
  }
259
259
  ]
@@ -332,7 +332,7 @@
332
332
  ]
333
333
  },
334
334
  "decorator": {
335
- "begin": "(?x)\n^\\s*\n((@)) \\s* (?=[[:alpha:]_]\\w*)\n",
335
+ "begin": "^\\s*((@))\\s*(?=[A-Za-z_]\\w*)",
336
336
  "beginCaptures": {
337
337
  "1": {
338
338
  "name": "entity.name.function.decorator.python"
@@ -341,7 +341,7 @@
341
341
  "name": "punctuation.definition.decorator.python"
342
342
  }
343
343
  },
344
- "end": "(?x)\n( \\) )\n\n(?: (.*?) (?=\\s*(?:\\#|$)) )\n| (?=\\n|\\#)\n",
344
+ "end": "(\\))(?:(.*?)(?=\\s*(?:\\#|$)))|(?=\\n|\\#)",
345
345
  "endCaptures": {
346
346
  "1": {
347
347
  "name": "punctuation.definition.arguments.end.python"
@@ -374,7 +374,7 @@
374
374
  "name": "punctuation.separator.period.python"
375
375
  }
376
376
  },
377
- "match": "(?x)\n([[:alpha:]_]\\w*) | (\\.)\n",
377
+ "match": "([A-Za-z_]\\w*)|(\\.)",
378
378
  "name": "entity.name.function.decorator.python"
379
379
  },
380
380
  {
@@ -386,7 +386,7 @@
386
386
  "name": "invalid.illegal.decorator.python"
387
387
  }
388
388
  },
389
- "match": "(?x)\n\\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n",
389
+ "match": "\\s*([^(A-Za-z\\s_\\.#\\\\].*?)(?=\\#|$)",
390
390
  "name": "invalid.illegal.decorator.python"
391
391
  }
392
392
  ]
@@ -394,7 +394,7 @@
394
394
  "double-one-regexp-character-set": {
395
395
  "patterns": [
396
396
  {
397
- "match": "(?x)\n\\[ \\^? \\] (?! .*?\\])\n"
397
+ "match": "\\[\\s\\^?\\s\\](?!.*?\\])"
398
398
  },
399
399
  {
400
400
  "begin": "(\\[)(\\^)?(\\])?",
@@ -455,7 +455,7 @@
455
455
  ]
456
456
  },
457
457
  "double-one-regexp-conditional": {
458
- "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
458
+ "begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
459
459
  "beginCaptures": {
460
460
  "0": {
461
461
  "name": "keyword.operator.conditional.regexp"
@@ -623,7 +623,7 @@
623
623
  ]
624
624
  },
625
625
  "double-one-regexp-named-group": {
626
- "begin": "(?x)\n(\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
626
+ "begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
627
627
  "beginCaptures": {
628
628
  "1": {
629
629
  "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
@@ -695,7 +695,7 @@
695
695
  "double-three-regexp-character-set": {
696
696
  "patterns": [
697
697
  {
698
- "match": "(?x)\n\\[ \\^? \\] (?! .*?\\])\n"
698
+ "match": "\\[\\s\\^?\\s\\](?!.*?\\])"
699
699
  },
700
700
  {
701
701
  "begin": "(\\[)(\\^)?(\\])?",
@@ -756,7 +756,7 @@
756
756
  ]
757
757
  },
758
758
  "double-three-regexp-conditional": {
759
- "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
759
+ "begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
760
760
  "beginCaptures": {
761
761
  "0": {
762
762
  "name": "keyword.operator.conditional.regexp"
@@ -942,7 +942,7 @@
942
942
  ]
943
943
  },
944
944
  "double-three-regexp-named-group": {
945
- "begin": "(?x)\n(\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
945
+ "begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
946
946
  "beginCaptures": {
947
947
  "1": {
948
948
  "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
@@ -1025,13 +1025,13 @@
1025
1025
  "name": "constant.other.ellipsis.python"
1026
1026
  },
1027
1027
  "escape-sequence": {
1028
- "match": "(?x)\n\\\\ (\nx[0-9A-Fa-f]{2}\n| [0-7]{1,3}\n| [\\\\\"'abfnrtv]\n)\n",
1028
+ "match": "\\\\(x[0-9A-Fa-f]{2}|[0-7]{1,3}|[\\\\\"'abfnrtv])",
1029
1029
  "name": "constant.character.escape.python"
1030
1030
  },
1031
1031
  "escape-sequence-unicode": {
1032
1032
  "patterns": [
1033
1033
  {
1034
- "match": "(?x)\n\\\\ (\nu[0-9A-Fa-f]{4}\n| U[0-9A-Fa-f]{8}\n| N\\{[\\w\\s]+?\\}\n)\n",
1034
+ "match": "\\\\(u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\\{[\\w\\s]+?\\})",
1035
1035
  "name": "constant.character.escape.python"
1036
1036
  }
1037
1037
  ]
@@ -1047,7 +1047,7 @@
1047
1047
  },
1048
1048
  {
1049
1049
  "comment": "Tokenize identifiers to help linters",
1050
- "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b"
1050
+ "match": "\\b([A-Za-z_]\\w*)\\b"
1051
1051
  }
1052
1052
  ]
1053
1053
  },
@@ -1153,7 +1153,7 @@
1153
1153
  },
1154
1154
  {
1155
1155
  "comment": "Tokenize identifiers to help linters",
1156
- "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b"
1156
+ "match": "\\b([A-Za-z_]\\w*)\\b"
1157
1157
  }
1158
1158
  ]
1159
1159
  },
@@ -1174,7 +1174,7 @@
1174
1174
  ]
1175
1175
  },
1176
1176
  "fregexp-quantifier": {
1177
- "match": "(?x)\n\\{\\{(\n\\d+ | \\d+,(\\d+)? | ,\\d+\n)\\}\\}\n",
1177
+ "match": "\\{\\{(\\d+|\\d+,(\\d+)?|,\\d+)\\}\\}",
1178
1178
  "name": "keyword.operator.quantifier.regexp"
1179
1179
  },
1180
1180
  "fstring-fnorm-quoted-multi-line": {
@@ -1344,7 +1344,7 @@
1344
1344
  }
1345
1345
  },
1346
1346
  "comment": "value interpolation using { ... }",
1347
- "end": "(?x)\n(\\})\n",
1347
+ "end": "(\\})",
1348
1348
  "endCaptures": {
1349
1349
  "1": {
1350
1350
  "name": "constant.character.format.placeholder.other.python"
@@ -1360,7 +1360,7 @@
1360
1360
  ]
1361
1361
  },
1362
1362
  "fstring-multi-core": {
1363
- "match": "(?x)\n(.+?)\n(\n(?# .* and .*? in multi-line match need special handling of\nnewlines otherwise SublimeText and Atom will match slightly\ndifferently.\n\nThe guard for newlines has to be separate from the\nlookahead because of special $ matching rule.)\n($\\n?)\n|\n(?=[\\\\\\}\\{]|'''|\"\"\")\n)\n(?# due to how multiline regexps are matched we need a special case\nfor matching a newline character)\n| \\n\n",
1363
+ "match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|'''|\"\"\"))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
1364
1364
  "name": "string.interpolated.python string.quoted.multi.python"
1365
1365
  },
1366
1366
  "fstring-normf-quoted-multi-line": {
@@ -1450,7 +1450,7 @@
1450
1450
  ]
1451
1451
  },
1452
1452
  "fstring-raw-multi-core": {
1453
- "match": "(?x)\n(.+?)\n(\n(?# .* and .*? in multi-line match need special handling of\nnewlines otherwise SublimeText and Atom will match slightly\ndifferently.\n\nThe guard for newlines has to be separate from the\nlookahead because of special $ matching rule.)\n($\\n?)\n|\n(?=[\\\\\\}\\{]|'''|\"\"\")\n)\n(?# due to how multiline regexps are matched we need a special case\nfor matching a newline character)\n| \\n\n",
1453
+ "match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|'''|\"\"\"))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
1454
1454
  "name": "string.interpolated.python string.quoted.raw.multi.python"
1455
1455
  },
1456
1456
  "fstring-raw-quoted-multi-line": {
@@ -1524,7 +1524,7 @@
1524
1524
  ]
1525
1525
  },
1526
1526
  "fstring-raw-single-core": {
1527
- "match": "(?x)\n(.+?)\n(\n(?# .* and .*? in multi-line match need special handling of\nnewlines otherwise SublimeText and Atom will match slightly\ndifferently.\n\nThe guard for newlines has to be separate from the\nlookahead because of special $ matching rule.)\n($\\n?)\n|\n(?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n)\n(?# due to how multiline regexps are matched we need a special case\nfor matching a newline character)\n| \\n\n",
1527
+ "match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n)))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
1528
1528
  "name": "string.interpolated.python string.quoted.raw.single.python"
1529
1529
  },
1530
1530
  "fstring-single-brace": {
@@ -1535,7 +1535,7 @@
1535
1535
  }
1536
1536
  },
1537
1537
  "comment": "value interpolation using { ... }",
1538
- "end": "(?x)\n(\\})|(?=\\n)\n",
1538
+ "end": "(\\})|(?=\\n)",
1539
1539
  "endCaptures": {
1540
1540
  "1": {
1541
1541
  "name": "constant.character.format.placeholder.other.python"
@@ -1551,7 +1551,7 @@
1551
1551
  ]
1552
1552
  },
1553
1553
  "fstring-single-core": {
1554
- "match": "(?x)\n(.+?)\n(\n(?# .* and .*? in multi-line match need special handling of\nnewlines otherwise SublimeText and Atom will match slightly\ndifferently.\n\nThe guard for newlines has to be separate from the\nlookahead because of special $ matching rule.)\n($\\n?)\n|\n(?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n)\n(?# due to how multiline regexps are matched we need a special case\nfor matching a newline character)\n| \\n\n",
1554
+ "match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n)))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
1555
1555
  "name": "string.interpolated.python string.quoted.single.python"
1556
1556
  },
1557
1557
  "fstring-terminator-multi": {
@@ -1573,7 +1573,7 @@
1573
1573
  "name": "storage.type.format.python"
1574
1574
  }
1575
1575
  },
1576
- "match": "(?x)\n( (?: =?) (?: ![rsa])? )\n( : \\w? [<>=^]? [-+ ]? \\#?\n\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n"
1576
+ "match": "((?:=?)(?:![rsa])?)(:\\w?[<>=^]?[-+\\s]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)(?=})"
1577
1577
  },
1578
1578
  {
1579
1579
  "include": "#fstring-terminator-multi-tail"
@@ -1651,7 +1651,7 @@
1651
1651
  "name": "storage.type.format.python"
1652
1652
  }
1653
1653
  },
1654
- "match": "(?x)\n( (?: =?) (?: ![rsa])? )\n( : \\w? [<>=^]? [-+ ]? \\#?\n\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n"
1654
+ "match": "((?:=?)(?:![rsa])?)(:\\w?[<>=^]?[-+\\s]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)(?=})"
1655
1655
  },
1656
1656
  {
1657
1657
  "include": "#fstring-terminator-single-tail"
@@ -1730,7 +1730,7 @@
1730
1730
  "name": "keyword.operator.unpacking.arguments.python"
1731
1731
  }
1732
1732
  },
1733
- "match": "(?x)\n(?:(?<=[,(])|^) \\s* (\\*{1,2})\n"
1733
+ "match": "(?:(?<=[,(])|^)\\s*(\\*{1,2})"
1734
1734
  },
1735
1735
  {
1736
1736
  "include": "#lambda-incomplete"
@@ -1747,7 +1747,7 @@
1747
1747
  "name": "keyword.operator.assignment.python"
1748
1748
  }
1749
1749
  },
1750
- "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)"
1750
+ "match": "\\b([A-Za-z_]\\w*)\\s*(=)(?!=)"
1751
1751
  },
1752
1752
  {
1753
1753
  "match": "=(?!=)",
@@ -1770,7 +1770,7 @@
1770
1770
  ]
1771
1771
  },
1772
1772
  "function-call": {
1773
- "begin": "(?x)\n\\b(?=\n([[:alpha:]_]\\w*) \\s* (\\()\n)\n",
1773
+ "begin": "\\b(?=([A-Za-z_]\\w*)\\s*(\\())",
1774
1774
  "comment": "Regular function call of the type \"name(args)\"",
1775
1775
  "end": "(\\))",
1776
1776
  "endCaptures": {
@@ -1792,7 +1792,7 @@
1792
1792
  ]
1793
1793
  },
1794
1794
  "function-declaration": {
1795
- "begin": "(?x)\n\\s*\n(?:\\b(async) \\s+)? \\b(def|fn)\\s+\n(?=\n[[:alpha:]_][[:word:]]* \\s* [\\(\\[]\n)\n",
1795
+ "begin": "\\s*(?:\\b(async)\\s+)?\\b(def|fn)\\s+(?=[A-Za-z_][\\w]*\\s*[\\(\\[])",
1796
1796
  "beginCaptures": {
1797
1797
  "1": {
1798
1798
  "name": "storage.type.function.async.python"
@@ -1838,7 +1838,7 @@
1838
1838
  "include": "#builtin-possible-callables"
1839
1839
  },
1840
1840
  {
1841
- "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\b\n",
1841
+ "match": "\\b([A-Za-z_]\\w*)\\b",
1842
1842
  "name": "entity.name.function.python"
1843
1843
  }
1844
1844
  ]
@@ -1854,7 +1854,7 @@
1854
1854
  },
1855
1855
  {
1856
1856
  "comment": "Some color schemas support meta.function-call.generic scope",
1857
- "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\b\n",
1857
+ "match": "\\b([A-Za-z_]\\w*)\\b",
1858
1858
  "name": "meta.function-call.generic.python"
1859
1859
  }
1860
1860
  ]
@@ -1891,7 +1891,7 @@
1891
1891
  "name": "keyword.control.import.python"
1892
1892
  }
1893
1893
  },
1894
- "match": "(?x)\n\\b(?:\n(\nand | assert | async | await | break | class | struct | trait | continue | del | elif | else | except | finally | for | from | global\n| if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n| nonlocal | not | or | pass | raise | return | try | while | with\n| yield\n) | (def | fn | capturing | raises) | (\nas | import\n)\n)\\b\n"
1894
+ "match": "\\b(?:(and|assert|async|await|break|class|struct|trait|continue|del|elif|else|except|finally|for|from|global|if|in|is|(?<=\\.)lambda|lambda(?=\\s*[\\.=])|nonlocal|not|or|pass|raise|return|try|while|with|yield)|(def|fn|capturing|raises)|(as|import))\\b"
1895
1895
  },
1896
1896
  "illegal-object-name": {
1897
1897
  "comment": "It's illegal to name class or function \"True\"",
@@ -1966,7 +1966,7 @@
1966
1966
  "name": "entity.other.inherited-class.python"
1967
1967
  }
1968
1968
  },
1969
- "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\b\n"
1969
+ "match": "\\b([A-Za-z_]\\w*)\\b"
1970
1970
  },
1971
1971
  "inheritance-name": {
1972
1972
  "patterns": [
@@ -1984,7 +1984,7 @@
1984
1984
  "item-access": {
1985
1985
  "patterns": [
1986
1986
  {
1987
- "begin": "(?x)\n\\b(?=\n[[:alpha:]_]\\w* \\s* \\[\n)\n",
1987
+ "begin": "\\b(?=[A-Za-z_]\\w*\\s*\\[)",
1988
1988
  "end": "(\\])",
1989
1989
  "endCaptures": {
1990
1990
  "1": {
@@ -2037,7 +2037,7 @@
2037
2037
  "include": "#special-names"
2038
2038
  },
2039
2039
  {
2040
- "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\b\n",
2040
+ "match": "\\b([A-Za-z_]\\w*)\\b",
2041
2041
  "name": "meta.indexed-name.python"
2042
2042
  }
2043
2043
  ]
@@ -2061,7 +2061,7 @@
2061
2061
  "match": "\\b(lambda)\\s*?(?=[,\\n]|$)"
2062
2062
  },
2063
2063
  {
2064
- "begin": "(?x)\n\\b (lambda) \\b\n",
2064
+ "begin": "\\b(lambda)\\b",
2065
2065
  "beginCaptures": {
2066
2066
  "1": {
2067
2067
  "name": "storage.type.function.lambda.python"
@@ -2103,7 +2103,7 @@
2103
2103
  "name": "punctuation.separator.parameters.python"
2104
2104
  }
2105
2105
  },
2106
- "match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))"
2106
+ "match": "([A-Za-z_]\\w*)\\s*(?:(,)|(?=:|$))"
2107
2107
  },
2108
2108
  {
2109
2109
  "include": "#comments"
@@ -2133,7 +2133,7 @@
2133
2133
  "name": "storage.type.function.lambda.python"
2134
2134
  },
2135
2135
  "lambda-parameter-with-default": {
2136
- "begin": "(?x)\n\\b\n([[:alpha:]_]\\w*) \\s* (=)\n",
2136
+ "begin": "\\b([A-Za-z_]\\w*)\\s*(=)",
2137
2137
  "beginCaptures": {
2138
2138
  "1": {
2139
2139
  "name": "variable.parameter.function.language.python"
@@ -2174,7 +2174,7 @@
2174
2174
  "name": "punctuation.separator.continuation.line.python"
2175
2175
  }
2176
2176
  },
2177
- "end": "(?x)\n(?=^\\s*$)\n|\n(?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n|\n(\\G $) (?# '\\G' is necessary for ST)\n)\n",
2177
+ "end": "(?=^\\s*$)|(?!(\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))|(\\G$)(?#'\\G'isnecessaryforST))",
2178
2178
  "patterns": [
2179
2179
  {
2180
2180
  "include": "#regexp"
@@ -2242,7 +2242,7 @@
2242
2242
  }
2243
2243
  },
2244
2244
  "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n",
2245
- "match": "(?x)\n\\b(\n__(?:\nabs | add | aenter | aexit | aiter | and | anext\n| await | bool | call | ceil | class_getitem\n| cmp | coerce | complex | contains | copy\n| deepcopy | del | delattr | delete | delitem\n| delslice | dir | div | divmod | enter | eq\n| exit | float | floor | floordiv | format | ge\n| get | getattr | getattribute | getinitargs\n| getitem | getnewargs | getslice | getstate | gt\n| hash | hex | iadd | iand | idiv | ifloordiv |\n| ilshift | imod | imul | index | init\n| instancecheck | int | invert | ior | ipow\n| irshift | isub | iter | itruediv | ixor | le\n| len | long | lshift | lt | missing | mod | mul\n| ne | neg | new | next | nonzero | oct | or | pos\n| pow | radd | rand | rdiv | rdivmod | reduce\n| reduce_ex | repr | reversed | rfloordiv |\n| rlshift | rmod | rmul | ror | round | rpow\n| rrshift | rshift | rsub | rtruediv | rxor | set\n| setattr | setitem | set_name | setslice\n| setstate | sizeof | str | sub | subclasscheck\n| truediv | trunc | unicode | xor | matmul\n| rmatmul | imatmul | init_subclass | set_name\n| fspath | bytes | prepare | length_hint\n)__\n)\\b\n"
2245
+ "match": "\\b(__(?:abs|add|aenter|aexit|aiter|and|anext|await|bool|call|ceil|class_getitem|cmp|coerce|complex|contains|copy|deepcopy|del|delattr|delete|delitem|delslice|dir|div|divmod|enter|eq|exit|float|floor|floordiv|format|ge|get|getattr|getattribute|getinitargs|getitem|getnewargs|getslice|getstate|gt|hash|hex|iadd|iand|idiv|ifloordiv||ilshift|imod|imul|index|init|instancecheck|int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|long|lshift|lt|missing|mod|mul|ne|neg|new|next|nonzero|oct|or|pos|pow|radd|rand|rdiv|rdivmod|reduce|reduce_ex|repr|reversed|rfloordiv||rlshift|rmod|rmul|ror|round|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|set_name|setslice|setstate|sizeof|str|sub|subclasscheck|truediv|trunc|unicode|xor|matmul|rmatmul|imatmul|init_subclass|set_name|fspath|bytes|prepare|length_hint)__)\\b"
2246
2246
  },
2247
2247
  "magic-names": {
2248
2248
  "patterns": [
@@ -2261,7 +2261,7 @@
2261
2261
  }
2262
2262
  },
2263
2263
  "comment": "magic variables which a class/module may have.",
2264
- "match": "(?x)\n\\b(\n__(?:\nall | annotations | bases | builtins | class\n| struct\n| trait\n| closure | code | debug | defaults | dict | doc | file | func\n| globals | kwdefaults | match_args | members | metaclass | methods\n| module | mro | mro_entries | name | qualname | post_init | self\n| signature | slots | subclasses | version | weakref | wrapped\n| classcell | spec | path | package | future | traceback\n)__\n)\\b\n"
2264
+ "match": "\\b(__(?:all|annotations|bases|builtins|class|struct|trait|closure|code|debug|defaults|dict|doc|file|func|globals|kwdefaults|match_args|members|metaclass|methods|module|mro|mro_entries|name|qualname|post_init|self|signature|slots|subclasses|version|weakref|wrapped|classcell|spec|path|package|future|traceback)__)\\b"
2265
2265
  },
2266
2266
  "member-access": {
2267
2267
  "begin": "(\\.)\\s*(?!\\.)",
@@ -2270,7 +2270,7 @@
2270
2270
  "name": "punctuation.separator.period.python"
2271
2271
  }
2272
2272
  },
2273
- "end": "(?x)\n\n\n(?<=\\S)(?=\\W) |\n\n\n(^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n$\n",
2273
+ "end": "(?<=\\S)(?=\\W)|(^|(?<=\\s))(?=[^\\\\\\w\\s])|$",
2274
2274
  "name": "meta.member.access.python",
2275
2275
  "patterns": [
2276
2276
  {
@@ -2286,7 +2286,7 @@
2286
2286
  },
2287
2287
  "member-access-attribute": {
2288
2288
  "comment": "Highlight attribute access in otherwise non-specialized cases.",
2289
- "match": "(?x)\n\\b ([[:alpha:]_]\\w*) \\b\n",
2289
+ "match": "\\b([A-Za-z_]\\w*)\\b",
2290
2290
  "name": "meta.attribute.python"
2291
2291
  },
2292
2292
  "member-access-base": {
@@ -2348,7 +2348,7 @@
2348
2348
  "name": "meta.function.parameters.python",
2349
2349
  "patterns": [
2350
2350
  {
2351
- "begin": "(?x)\n\\b\n([[:alpha:]_]\\w*) \\s* (:)\n",
2351
+ "begin": "\\b([A-Za-z_]\\w*)\\s*(:)",
2352
2352
  "beginCaptures": {
2353
2353
  "1": {
2354
2354
  "name": "variable.parameter.function.language.python"
@@ -2407,7 +2407,7 @@
2407
2407
  "name": "storage.type.number.python"
2408
2408
  }
2409
2409
  },
2410
- "match": "(?x)\n(?<![\\w\\.])\n(0[bB]) (_?[01])+\n\\b\n",
2410
+ "match": "(?<![\\w\\.])(0[bB])(_?[01])+\\b",
2411
2411
  "name": "constant.numeric.bin.python"
2412
2412
  },
2413
2413
  "number-dec": {
@@ -2419,7 +2419,7 @@
2419
2419
  "name": "invalid.illegal.dec.python"
2420
2420
  }
2421
2421
  },
2422
- "match": "(?x)\n(?<![\\w\\.])(?:\n[1-9](?: _?[0-9] )*\n|\n0+\n|\n[0-9](?: _?[0-9] )* ([jJ])\n|\n0 ([0-9]+)(?![eE\\.])\n)\\b\n",
2422
+ "match": "(?<![\\w\\.])(?:[1-9](?:_?[0-9])*|0+|[0-9](?:_?[0-9])*([jJ])|0([0-9]+)(?![eE\\.]))\\b",
2423
2423
  "name": "constant.numeric.dec.python"
2424
2424
  },
2425
2425
  "number-float": {
@@ -2428,7 +2428,7 @@
2428
2428
  "name": "storage.type.imaginary.number.python"
2429
2429
  }
2430
2430
  },
2431
- "match": "(?x)\n(?<! \\w)(?:\n(?:\n\\.[0-9](?: _?[0-9] )*\n|\n[0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n|\n[0-9](?: _?[0-9] )* \\.\n) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n|\n[0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n)([jJ])?\\b\n",
2431
+ "match": "(?<!\\w)(?:(?:\\.[0-9](?:_?[0-9])*|[0-9](?:_?[0-9])*\\.[0-9](?:_?[0-9])*|[0-9](?:_?[0-9])*\\.)(?:[eE][+-]?[0-9](?:_?[0-9])*)?|[0-9](?:_?[0-9])*(?:[eE][+-]?[0-9](?:_?[0-9])*))([jJ])?\\b",
2432
2432
  "name": "constant.numeric.float.python"
2433
2433
  },
2434
2434
  "number-hex": {
@@ -2437,7 +2437,7 @@
2437
2437
  "name": "storage.type.number.python"
2438
2438
  }
2439
2439
  },
2440
- "match": "(?x)\n(?<![\\w\\.])\n(0[xX]) (_?[0-9a-fA-F])+\n\\b\n",
2440
+ "match": "(?<![\\w\\.])(0[xX])(_?[0-9a-fA-F])+\\b",
2441
2441
  "name": "constant.numeric.hex.python"
2442
2442
  },
2443
2443
  "number-long": {
@@ -2447,7 +2447,7 @@
2447
2447
  }
2448
2448
  },
2449
2449
  "comment": "this is to support python2 syntax for long ints",
2450
- "match": "(?x)\n(?<![\\w\\.])\n([1-9][0-9]* | 0) ([lL])\n\\b\n",
2450
+ "match": "(?<![\\w\\.])([1-9][0-9]*|0)([lL])\\b",
2451
2451
  "name": "constant.numeric.bin.python"
2452
2452
  },
2453
2453
  "number-oct": {
@@ -2456,11 +2456,11 @@
2456
2456
  "name": "storage.type.number.python"
2457
2457
  }
2458
2458
  },
2459
- "match": "(?x)\n(?<![\\w\\.])\n(0[oO]) (_?[0-7])+\n\\b\n",
2459
+ "match": "(?<![\\w\\.])(0[oO])(_?[0-7])+\\b",
2460
2460
  "name": "constant.numeric.oct.python"
2461
2461
  },
2462
2462
  "odd-function-call": {
2463
- "begin": "(?x)\n(?<= \\] | \\) ) \\s*\n(?=\\()\n",
2463
+ "begin": "(?<=\\]|\\))\\s*(?=\\()",
2464
2464
  "comment": "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n",
2465
2465
  "end": "(\\))",
2466
2466
  "endCaptures": {
@@ -2495,7 +2495,7 @@
2495
2495
  "name": "keyword.operator.assignment.python"
2496
2496
  }
2497
2497
  },
2498
- "match": "(?x)\n\\b(?<!\\.)\n(?:\n(and | or | not | in | is) (?# 1)\n|\n(for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n)\n(?!\\s*:)\\b\n\n| (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n| (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n| (!= | == | >= | <= | < | >) (?# 5)\n\n| (:=) (?# 6)\n"
2498
+ "match": "\\b(?<!\\.)(?:(and|or|not|in|is)(?#1)|(for|if|else|await|(?:yield(?:\\s+from)?))(?#2))(?!\\s*:)\\b|(<<|>>|&|\\||\\^|~)(?#3)|(\\*\\*|\\*|\\+|-|%|//|/|@)(?#4)|(!=|==|>=|<=|<|>)(?#5)|(:=)(?#6)"
2499
2499
  },
2500
2500
  "parameter-special": {
2501
2501
  "captures": {
@@ -2512,7 +2512,7 @@
2512
2512
  "name": "punctuation.separator.parameters.python"
2513
2513
  }
2514
2514
  },
2515
- "match": "(?x)\n\\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n"
2515
+ "match": "\\b((self)|(cls))\\b\\s*(?:(,)|(?=\\)))"
2516
2516
  },
2517
2517
  "parameters": {
2518
2518
  "begin": "(\\()",
@@ -2562,7 +2562,7 @@
2562
2562
  "name": "punctuation.separator.parameters.python"
2563
2563
  }
2564
2564
  },
2565
- "match": "(?x)\n([[:alpha:]_]\\w*)\n\\s* (?: (,) | (?=[)#\\n=]))\n"
2565
+ "match": "([A-Za-z_]\\w*)\\s*(?:(,)|(?=[)#\\n=]))"
2566
2566
  },
2567
2567
  {
2568
2568
  "include": "#comments"
@@ -2615,7 +2615,7 @@
2615
2615
  "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp"
2616
2616
  }
2617
2617
  },
2618
- "match": "(?x)\n(\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n",
2618
+ "match": "(\\()(\\?P=\\w+(?:\\s+[0-9A-Za-z]+)?)(\\))",
2619
2619
  "name": "meta.backreference.named.regexp"
2620
2620
  },
2621
2621
  "regexp-backreference-number": {
@@ -2757,7 +2757,7 @@
2757
2757
  "name": "constant.character.escape.regexp"
2758
2758
  },
2759
2759
  "regexp-escape-character": {
2760
- "match": "(?x)\n\\\\ (\nx[0-9A-Fa-f]{2}\n| 0[0-7]{1,2}\n| [0-7]{3}\n)\n",
2760
+ "match": "\\\\(x[0-9A-Fa-f]{2}|0[0-7]{1,2}|[0-7]{3})",
2761
2761
  "name": "constant.character.escape.regexp"
2762
2762
  },
2763
2763
  "regexp-escape-sequence": {
@@ -2784,7 +2784,7 @@
2784
2784
  "name": "support.other.escape.special.regexp"
2785
2785
  },
2786
2786
  "regexp-escape-unicode": {
2787
- "match": "(?x)\n\\\\ (\nu[0-9A-Fa-f]{4}\n| U[0-9A-Fa-f]{8}\n)\n",
2787
+ "match": "\\\\(u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})",
2788
2788
  "name": "constant.character.unicode.regexp"
2789
2789
  },
2790
2790
  "regexp-flags": {
@@ -2792,7 +2792,7 @@
2792
2792
  "name": "storage.modifier.flag.regexp"
2793
2793
  },
2794
2794
  "regexp-quantifier": {
2795
- "match": "(?x)\n\\{(\n\\d+ | \\d+,(\\d+)? | ,\\d+\n)\\}\n",
2795
+ "match": "\\{(\\d+|\\d+,(\\d+)?|,\\d+)\\}",
2796
2796
  "name": "keyword.operator.quantifier.regexp"
2797
2797
  },
2798
2798
  "regexp-single-one-line": {
@@ -2903,7 +2903,7 @@
2903
2903
  "single-one-regexp-character-set": {
2904
2904
  "patterns": [
2905
2905
  {
2906
- "match": "(?x)\n\\[ \\^? \\] (?! .*?\\])\n"
2906
+ "match": "\\[\\s\\^?\\s\\](?!.*?\\])"
2907
2907
  },
2908
2908
  {
2909
2909
  "begin": "(\\[)(\\^)?(\\])?",
@@ -2964,7 +2964,7 @@
2964
2964
  ]
2965
2965
  },
2966
2966
  "single-one-regexp-conditional": {
2967
- "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
2967
+ "begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
2968
2968
  "beginCaptures": {
2969
2969
  "0": {
2970
2970
  "name": "keyword.operator.conditional.regexp"
@@ -3132,7 +3132,7 @@
3132
3132
  ]
3133
3133
  },
3134
3134
  "single-one-regexp-named-group": {
3135
- "begin": "(?x)\n(\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
3135
+ "begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
3136
3136
  "beginCaptures": {
3137
3137
  "1": {
3138
3138
  "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
@@ -3204,7 +3204,7 @@
3204
3204
  "single-three-regexp-character-set": {
3205
3205
  "patterns": [
3206
3206
  {
3207
- "match": "(?x)\n\\[ \\^? \\] (?! .*?\\])\n"
3207
+ "match": "\\[\\s\\^?\\s\\](?!.*?\\])"
3208
3208
  },
3209
3209
  {
3210
3210
  "begin": "(\\[)(\\^)?(\\])?",
@@ -3265,7 +3265,7 @@
3265
3265
  ]
3266
3266
  },
3267
3267
  "single-three-regexp-conditional": {
3268
- "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
3268
+ "begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
3269
3269
  "beginCaptures": {
3270
3270
  "0": {
3271
3271
  "name": "keyword.operator.conditional.regexp"
@@ -3451,7 +3451,7 @@
3451
3451
  ]
3452
3452
  },
3453
3453
  "single-three-regexp-named-group": {
3454
- "begin": "(?x)\n(\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
3454
+ "begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
3455
3455
  "beginCaptures": {
3456
3456
  "1": {
3457
3457
  "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
@@ -3530,7 +3530,7 @@
3530
3530
  ]
3531
3531
  },
3532
3532
  "special-names": {
3533
- "match": "(?x)\n\\b\n\n\n\n\n\n(\n_* [[:upper:]] [_\\d]* [[:upper:]]\n)\n[[:upper:]\\d]* (_\\w*)?\n\\b\n",
3533
+ "match": "\\b(_*[A-Z][_\\d]*[A-Z])[A-Z\\d]*(_\\w*)?\\b",
3534
3534
  "name": "constant.other.caps.python"
3535
3535
  },
3536
3536
  "special-variables": {
@@ -3542,7 +3542,7 @@
3542
3542
  "name": "variable.language.special.cls.python"
3543
3543
  }
3544
3544
  },
3545
- "match": "(?x)\n\\b (?<!\\.) (?:\n(self) | (cls)\n)\\b\n"
3545
+ "match": "\\b(?<!\\.)(?:(self)|(cls))\\b"
3546
3546
  },
3547
3547
  "statement": {
3548
3548
  "patterns": [
@@ -3589,11 +3589,11 @@
3589
3589
  "name": "keyword.control.import.python"
3590
3590
  },
3591
3591
  {
3592
- "match": "(?x)\n\\b(?<!\\.)(\nasync | continue | del | assert | break | finally | for\n| from | elif | else | if | except | pass | raise\n| return | try | while | with\n)\\b\n",
3592
+ "match": "\\b(?<!\\.)(async|continue|del|assert|break|finally|for|from|elif|else|if|except|pass|raise|return|try|while|with)\\b",
3593
3593
  "name": "keyword.control.flow.python"
3594
3594
  },
3595
3595
  {
3596
- "match": "(?x)\n\\b(?<!\\.)(\nglobal | nonlocal\n)\\b\n",
3596
+ "match": "\\b(?<!\\.)(global|nonlocal)\\b",
3597
3597
  "name": "storage.modifier.declaration.python"
3598
3598
  },
3599
3599
  {
@@ -3606,7 +3606,7 @@
3606
3606
  "name": "keyword.control.flow.python"
3607
3607
  }
3608
3608
  },
3609
- "match": "(?x)\n^\\s*(\ncase | match\n)(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b\n"
3609
+ "match": "^\\s*(case|match)(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b"
3610
3610
  },
3611
3611
  {
3612
3612
  "captures": {
@@ -3617,7 +3617,7 @@
3617
3617
  "name": "variable.other.python"
3618
3618
  }
3619
3619
  },
3620
- "match": "\\b(var|let|alias) \\s*([[:alpha:]_]\\w*)\\b"
3620
+ "match": "\\b(var|let|alias) \\s*([A-Za-z_]\\w*)\\b"
3621
3621
  }
3622
3622
  ]
3623
3623
  },
@@ -3733,7 +3733,7 @@
3733
3733
  "name": "storage.type.format.python"
3734
3734
  }
3735
3735
  },
3736
- "match": "(?x)\n(\n{{ | }}\n| (?:\n{\n\\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n(![rsa])?\n( : \\w? [<>=^]? [-+ ]? \\#?\n\\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n})\n)\n",
3736
+ "match": "({{|}}|(?:{\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:\\w?[<>=^]?[-+\\s]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)?}))",
3737
3737
  "name": "meta.format.brace.python"
3738
3738
  },
3739
3739
  {
@@ -3748,7 +3748,7 @@
3748
3748
  "name": "storage.type.format.python"
3749
3749
  }
3750
3750
  },
3751
- "match": "(?x)\n(\n{\n\\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n(![rsa])?\n(:)\n[^'\"{}\\n]* (?:\n\\{ [^'\"}\\n]*? \\} [^'\"{}\\n]*\n)*\n}\n)\n",
3751
+ "match": "({\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:)[^'\"{}\\n]*(?:\\{[^'\"}\\n]*?\\}[^'\"{}\\n]*)*})",
3752
3752
  "name": "meta.format.brace.python"
3753
3753
  }
3754
3754
  ]
@@ -3775,7 +3775,7 @@
3775
3775
  "name": "constant.character.format.placeholder.other.python"
3776
3776
  }
3777
3777
  },
3778
- "match": "(?x)\n(\n% (\\([\\w\\s]*\\))?\n[-+#0 ]*\n(\\d+|\\*)? (\\.(\\d+|\\*))?\n([hlL])?\n[diouxXeEfFgGcrsab%]\n)\n",
3778
+ "match": "(%(\\([\\w\\s]*\\))?[-+#0\\s]*(\\d+|\\*)?(\\.(\\d+|\\*))?([hlL])?[diouxXeEfFgGcrsab%])",
3779
3779
  "name": "meta.format.percent.python"
3780
3780
  },
3781
3781
  "string-line-continuation": {
@@ -3807,7 +3807,7 @@
3807
3807
  ]
3808
3808
  },
3809
3809
  "string-multi-bad-brace1-formatting-raw": {
3810
- "begin": "(?x)\n(?= \\{%\n( .*? (?!'''|\"\"\") )\n%\\}\n)\n",
3810
+ "begin": "(?=\\{%(.*?(?!'''|\"\"\"))%\\})",
3811
3811
  "comment": "template using {% ... %}",
3812
3812
  "end": "(?='''|\"\"\")",
3813
3813
  "patterns": [
@@ -3817,7 +3817,7 @@
3817
3817
  ]
3818
3818
  },
3819
3819
  "string-multi-bad-brace1-formatting-unicode": {
3820
- "begin": "(?x)\n(?= \\{%\n( .*? (?!'''|\"\"\") )\n%\\}\n)\n",
3820
+ "begin": "(?=\\{%(.*?(?!'''|\"\"\"))%\\})",
3821
3821
  "comment": "template using {% ... %}",
3822
3822
  "end": "(?='''|\"\"\")",
3823
3823
  "patterns": [
@@ -3833,7 +3833,7 @@
3833
3833
  ]
3834
3834
  },
3835
3835
  "string-multi-bad-brace2-formatting-raw": {
3836
- "begin": "(?x)\n(?!\\{\\{)\n(?= \\{ (\n\\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n)\n.*?(?!'''|\"\"\")\n\\}\n)\n",
3836
+ "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!'''|\"\"\")[^!:\\.\\[}\\w]).*?(?!'''|\"\"\")\\})",
3837
3837
  "comment": "odd format or format-like syntax",
3838
3838
  "end": "(?='''|\"\"\")",
3839
3839
  "patterns": [
@@ -3846,7 +3846,7 @@
3846
3846
  ]
3847
3847
  },
3848
3848
  "string-multi-bad-brace2-formatting-unicode": {
3849
- "begin": "(?x)\n(?!\\{\\{)\n(?= \\{ (\n\\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n)\n.*?(?!'''|\"\"\")\n\\}\n)\n",
3849
+ "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!'''|\"\"\")[^!:\\.\\[}\\w]).*?(?!'''|\"\"\")\\})",
3850
3850
  "comment": "odd format or format-like syntax",
3851
3851
  "end": "(?='''|\"\"\")",
3852
3852
  "patterns": [
@@ -4074,7 +4074,7 @@
4074
4074
  ]
4075
4075
  },
4076
4076
  "string-single-bad-brace1-formatting-raw": {
4077
- "begin": "(?x)\n(?= \\{%\n( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n%\\}\n)\n",
4077
+ "begin": "(?=\\{%(.*?(?!(['\"])|((?<!\\\\)\\n)))%\\})",
4078
4078
  "comment": "template using {% ... %}",
4079
4079
  "end": "(?=(['\"])|((?<!\\\\)\\n))",
4080
4080
  "patterns": [
@@ -4084,7 +4084,7 @@
4084
4084
  ]
4085
4085
  },
4086
4086
  "string-single-bad-brace1-formatting-unicode": {
4087
- "begin": "(?x)\n(?= \\{%\n( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n%\\}\n)\n",
4087
+ "begin": "(?=\\{%(.*?(?!(['\"])|((?<!\\\\)\\n)))%\\})",
4088
4088
  "comment": "template using {% ... %}",
4089
4089
  "end": "(?=(['\"])|((?<!\\\\)\\n))",
4090
4090
  "patterns": [
@@ -4100,7 +4100,7 @@
4100
4100
  ]
4101
4101
  },
4102
4102
  "string-single-bad-brace2-formatting-raw": {
4103
- "begin": "(?x)\n(?!\\{\\{)\n(?= \\{ (\n\\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n)\n.*?(?!(['\"])|((?<!\\\\)\\n))\n\\}\n)\n",
4103
+ "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!(['\"])|((?<!\\\\)\\n))[^!:\\.\\[}\\w]).*?(?!(['\"])|((?<!\\\\)\\n))\\})",
4104
4104
  "comment": "odd format or format-like syntax",
4105
4105
  "end": "(?=(['\"])|((?<!\\\\)\\n))",
4106
4106
  "patterns": [
@@ -4113,7 +4113,7 @@
4113
4113
  ]
4114
4114
  },
4115
4115
  "string-single-bad-brace2-formatting-unicode": {
4116
- "begin": "(?x)\n(?!\\{\\{)\n(?= \\{ (\n\\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n)\n.*?(?!(['\"])|((?<!\\\\)\\n))\n\\}\n)\n",
4116
+ "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!(['\"])|((?<!\\\\)\\n))[^!:\\.\\[}\\w]).*?(?!(['\"])|((?<!\\\\)\\n))\\})",
4117
4117
  "comment": "odd format or format-like syntax",
4118
4118
  "end": "(?=(['\"])|((?<!\\\\)\\n))",
4119
4119
  "patterns": [