Skip to content

Commit

Permalink
fix: regex processing
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 1, 2024
1 parent d8da95e commit 4584851
Show file tree
Hide file tree
Showing 26 changed files with 220 additions and 220 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"@antfu/eslint-config": "^3.0.0",
"@antfu/ni": "^0.23.0",
"@antfu/utils": "^0.7.10",
"@iconify-json/svg-spinners": "^1.1.3",
"@shikijs/core": "^1.15.1",
"@iconify-json/svg-spinners": "^1.2.0",
"@shikijs/core": "^1.15.2",
"@types/adm-zip": "^0.5.5",
"@types/cson": "^7.20.3",
"@types/js-yaml": "^4.0.9",
"@types/json-stable-stringify": "^1.0.36",
"@types/node": "^22.5.1",
"@types/node": "^22.5.2",
"@types/semver": "^7.5.8",
"@vitest/expect": "^2.0.5",
"adm-zip": "^0.5.16",
Expand All @@ -43,21 +43,21 @@
"js-yaml": "^4.1.0",
"json-stable-stringify": "^1.1.1",
"jsonc-parser": "^3.3.1",
"lint-staged": "^15.2.9",
"lint-staged": "^15.2.10",
"octokit": "^4.0.2",
"ofetch": "^1.3.4",
"oniguruma-to-js": "^0.2.4",
"oniguruma-to-js": "^0.2.5",
"p-limit": "^6.1.0",
"pnpm": "^9.9.0",
"rimraf": "^6.0.1",
"semver": "^7.6.3",
"simple-git": "^3.25.0",
"simple-git": "^3.26.0",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.5.4",
"unbuild": "^2.0.0",
"vite": "^5.4.2",
"vitest": "^2.0.5",
"vue-tsc": "^2.1.2",
"vue-tsc": "^2.1.4",
"yaml": "^2.5.0"
},
"simple-git-hooks": {
Expand Down
34 changes: 17 additions & 17 deletions packages/tm-grammars/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/tm-grammars/grammars/actionscript-3.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
"match": "(?<=:)\\s*(\\*)"
},
"escapes": {
"match": "\\\\(x[ \\t]{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
"match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.actionscript.3"
},
"extends": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tm-grammars/grammars/angular-expression.json
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@
]
},
"stringCharacterEscape": {
"match": "\\\\(x[ \\t]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
"match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
"name": "constant.character.escape.ts"
},
"ternaryExpression": {
Expand Down
4 changes: 2 additions & 2 deletions packages/tm-grammars/grammars/berry.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"name": "string.quoted.double.berry",
"patterns": [
{
"match": "(\\\\x[ \\t]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
"match": "(\\\\x[0-9A-Fa-f]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
"name": "constant.character.escape.berry"
}
]
Expand All @@ -131,7 +131,7 @@
"name": "string.quoted.other.berry",
"patterns": [
{
"match": "(\\\\x[ \\t]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
"match": "(\\\\x[0-9A-Fa-f]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
"name": "constant.character.escape.berry"
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/tm-grammars/grammars/cobol.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,15 @@
"name": "strong comment.line.set.acucobol"
},
{
"match": "([nNuU][xX]|[hHxX])'[ \\t]*'",
"match": "([nNuU][xX]|[hHxX])'[0-9A-Fa-f]*'",
"name": "constant.numeric.integer.hexadecimal.cobol"
},
{
"match": "([nNuU][xX]|[hHxX])'.*'",
"name": "invalid.illegal.hexadecimal.cobol"
},
{
"match": "([nNuU][xX]|[hHxX])\"[ \\t]*\"",
"match": "([nNuU][xX]|[hHxX])\"[0-9A-Fa-f]*\"",
"name": "constant.numeric.integer.hexadecimal.cobol"
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/tm-grammars/grammars/haml.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
"name": "string.quoted.double.ruby",
"patterns": [
{
"match": "\\\\(x[ \\t]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
"match": "\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.ruby"
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/tm-grammars/grammars/haxe.json
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@
"name": "constant.other.character-class.regexp"
},
{
"match": "\\\\([0-7]{3}|x[ \\t][ \\t]|u[ \\t][ \\t][ \\t][ \\t])",
"match": "\\\\([0-7]{3}|x[0-9A-Fa-f][0-9A-Fa-f]|u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])",
"name": "constant.character.numeric.regexp"
},
{
Expand Down Expand Up @@ -1851,7 +1851,7 @@
"name": "constant.character.escape.backslash.regexp"
}
},
"match": "(?:.|(\\\\(?:[0-7]{3}|x[ \\t][ \\t]|u[ \\t][ \\t][ \\t][ \\t]))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[ \\t][ \\t]|u[ \\t][ \\t][ \\t][ \\t]))|(\\\\c[A-Z])|(\\\\.))",
"match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f][0-9A-Fa-f]|u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f][0-9A-Fa-f]|u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]))|(\\\\c[A-Z])|(\\\\.))",
"name": "constant.other.character-class.range.regexp"
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/tm-grammars/grammars/hcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
},
"char_escapes": {
"comment": "Character Escapes",
"match": "\\\\[nrt\"\\\\]|\\\\u([ \\t]{8}|[ \\t]{4})",
"match": "\\\\[nrt\"\\\\]|\\\\u([0-9A-Fa-f]{8}|[0-9A-Fa-f]{4})",
"name": "constant.character.escape.hcl"
},
"comma": {
Expand Down
32 changes: 16 additions & 16 deletions packages/tm-grammars/grammars/less.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
]
},
"at-counter-style": {
"begin": "\\s*((@)counter-style\\b)\\s+(?:(?i:\\b(decimal|none)\\b)|(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*))\\s*(?=\\{|$)",
"begin": "\\s*((@)counter-style\\b)\\s+(?:(?i:\\b(decimal|none)\\b)|(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*))\\s*(?=\\{|$)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.counter-style.less"
Expand Down Expand Up @@ -472,7 +472,7 @@
"include": "#literal-string"
},
{
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)",
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)",
"name": "entity.name.constant.namespace-prefix.less"
}
]
Expand Down Expand Up @@ -656,7 +656,7 @@
"include": "#literal-string"
},
{
"begin": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)",
"begin": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)",
"end": "(?=\\))",
"name": "entity.other.attribute-name.less",
"patterns": [
Expand Down Expand Up @@ -985,7 +985,7 @@
"name": "punctuation.definition.constant.less"
}
},
"match": "(#)([ \\t]{3}|[ \\t]{4}|[ \\t]{6}|[ \\t]{8})\\b",
"match": "(#)([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})\\b",
"name": "constant.other.color.rgb-value.less"
},
{
Expand Down Expand Up @@ -1068,7 +1068,7 @@
"include": "#var-function"
},
{
"match": "(?:--(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))+|-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)",
"match": "(?:--(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))+|-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)",
"name": "entity.other.counter-name.less"
},
{
Expand Down Expand Up @@ -1113,7 +1113,7 @@
"end": "(?=\\))",
"patterns": [
{
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)",
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)",
"name": "entity.other.counter-name.less string.unquoted.less"
},
{
Expand Down Expand Up @@ -1245,7 +1245,7 @@
"name": "support.type.custom-property.name.less"
}
},
"match": "\\s*(--)((?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))+)",
"match": "\\s*(--)((?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))+)",
"name": "support.type.custom-property.less"
},
"dimensions": {
Expand Down Expand Up @@ -3312,7 +3312,7 @@
"less-variable-assignment": {
"patterns": [
{
"begin": "(@)(-?(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)",
"begin": "(@)(-?(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)",
"beginCaptures": {
"0": {
"name": "variable.other.readwrite.less"
Expand Down Expand Up @@ -3365,7 +3365,7 @@
"less-variable-comparison": {
"patterns": [
{
"begin": "(@{1,2})([-]?([_a-z]|[^\\x{00}-\\x{7F}]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)",
"begin": "(@{1,2})([-]?([_a-z]|[^\\x{00}-\\x{7F}]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)",
"beginCaptures": {
"0": {
"name": "variable.other.readwrite.less"
Expand Down Expand Up @@ -4136,7 +4136,7 @@
"name": "punctuation.separator.namespace.less"
}
},
"match": "(?:(-?(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)|(\\*))?([|])(?!=)"
"match": "(?:(-?(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)|(\\*))?([|])(?!=)"
},
"regexp-function": {
"begin": "\\b(regexp)(?=\\()",
Expand Down Expand Up @@ -4345,7 +4345,7 @@
"name": "support.type.custom-property.name.less"
}
},
"match": "\\b(var-)(-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)(?=\\s)",
"match": "\\b(var-)(-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)(?=\\s)",
"name": "invalid.deprecated.custom-property.less"
},
{
Expand Down Expand Up @@ -4378,7 +4378,7 @@
"include": "#property-values"
},
{
"match": "-?(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*(\\s+-?(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)*",
"match": "-?(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*(\\s+-?(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)*",
"name": "string.unquoted.less"
},
{
Expand Down Expand Up @@ -4607,7 +4607,7 @@
"name": "invalid.illegal.property-value.less"
},
{
"match": "-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*",
"match": "-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*",
"name": "support.constant.property-value.less"
},
{
Expand Down Expand Up @@ -4642,7 +4642,7 @@
"match": "(((\\+_?)?):)([\\s\\t]*)"
},
{
"match": "-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*",
"match": "-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*",
"name": "entity.name.constant.counter-name.less"
},
{
Expand Down Expand Up @@ -4904,7 +4904,7 @@
"include": "#qualified-name"
},
{
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)",
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))*)",
"name": "entity.other.attribute-name.less"
},
{
Expand Down Expand Up @@ -5161,7 +5161,7 @@
"name": "constant.character.escape.newline.less"
},
{
"match": "\\\\([ \\t]{1,6}|.)",
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"name": "constant.character.escape.less"
}
]
Expand Down
10 changes: 5 additions & 5 deletions packages/tm-grammars/grammars/nim.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@
"name": "constant.character.escape.escape.nim"
},
{
"match": "\\\\[xX][ \\t][ \\t]",
"match": "\\\\[xX][0-9A-Fa-f][0-9A-Fa-f]",
"name": "constant.character.escape.hex.nim"
},
{
Expand Down Expand Up @@ -1128,7 +1128,7 @@
"name": "constant.numeric.float.decimal.nim"
},
{
"match": "\\b0[xX][ \\t][_ \\t]*'([fF](32|64|128)|[fFdD])",
"match": "\\b0[xX][0-9A-Fa-f][_0-9A-Fa-f]*'([fF](32|64|128)|[fFdD])",
"name": "constant.numeric.float.hexadecimal.nim"
},
{
Expand Down Expand Up @@ -1317,7 +1317,7 @@
"integer_literal": {
"patterns": [
{
"match": "\\b(0[xX][ \\t][_ \\t]*)('(([iIuU](8|16|32|64))|[uU]))?",
"match": "\\b(0[xX][0-9A-Fa-f][_0-9A-Fa-f]*)('(([iIuU](8|16|32|64))|[uU]))?",
"name": "constant.numeric.integer.hexadecimal.nim"
},
{
Expand Down Expand Up @@ -1367,11 +1367,11 @@
"name": "constant.character.escape.newline.nim"
},
{
"match": "\\\\[uU][ \\t][ \\t][ \\t][ \\t]",
"match": "\\\\[uU][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]",
"name": "constant.character.escape.hex.nim"
},
{
"match": "\\\\[uU]\\{[ \\t]+\\}",
"match": "\\\\[uU]\\{[0-9A-Fa-f]+\\}",
"name": "constant.character.escape.hex.nim"
},
{
Expand Down
8 changes: 4 additions & 4 deletions packages/tm-grammars/grammars/objective-cpp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3659,7 +3659,7 @@
"name": "string.quoted.double.objcpp",
"patterns": [
{
"match": "\\\\u[ \\t]{4}|\\\\U[ \\t]{8}",
"match": "\\\\u[0-9A-Fa-f]{4}|\\\\U[0-9A-Fa-f]{8}",
"name": "constant.character.escape.objcpp"
},
{
Expand All @@ -3671,7 +3671,7 @@
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\x[ \\t]+",
"match": "\\\\x[0-9A-Fa-f]+",
"name": "constant.character.escape.objcpp"
},
{
Expand Down Expand Up @@ -6524,7 +6524,7 @@
"name": "string.quoted.double.objcpp",
"patterns": [
{
"match": "\\\\u[ \\t]{4}|\\\\U[ \\t]{8}",
"match": "\\\\u[0-9A-Fa-f]{4}|\\\\U[0-9A-Fa-f]{8}",
"name": "constant.character.escape.objcpp"
},
{
Expand All @@ -6536,7 +6536,7 @@
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\x[ \\t]+",
"match": "\\\\x[0-9A-Fa-f]+",
"name": "constant.character.escape.objcpp"
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/tm-grammars/grammars/powerquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"name": "constant.character.escapesequence.powerquery",
"patterns": [
{
"match": "(#|[ \\t]{4}|[ \\t]{8}|cr|lf|tab)(?:,(#|[ \\t]{4}|[ \\t]{8}|cr|lf|tab))*"
"match": "(#|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{8}|cr|lf|tab)(?:,(#|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{8}|cr|lf|tab))*"
},
{
"match": "[^\\)]",
Expand All @@ -93,7 +93,7 @@
"name": "constant.numeric.float.powerquery"
},
"HexNumber": {
"match": "0(x|X)[ \\t]+",
"match": "0(x|X)[0-9A-Fa-f]+",
"name": "constant.numeric.integer.hexadecimal.powerquery"
},
"Identifier": {
Expand Down
4 changes: 2 additions & 2 deletions packages/tm-grammars/grammars/ruby.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
"name": "constant.numeric.integer.ruby"
},
{
"match": "\\b0[xX][ \\t](?>_?[ \\t])*r?i?\\b",
"match": "\\b0[xX][0-9A-Fa-f](?>_?[0-9A-Fa-f])*r?i?\\b",
"name": "constant.numeric.hex.ruby"
},
{
Expand Down Expand Up @@ -577,7 +577,7 @@
},
{
"comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t",
"match": "(?<!\\w)\\?(\\\\(x[ \\t]{1,2}(?![ \\t])\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
"match": "(?<!\\w)\\?(\\\\(x[0-9A-Fa-f]{1,2}(?![0-9A-Fa-f])\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
"name": "constant.numeric.ruby"
},
{
Expand Down
Loading

0 comments on commit 4584851

Please sign in to comment.