Skip to content

Commit

Permalink
fix: do not convert \h for smaller bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 1, 2024
1 parent d0da67a commit 58d17c0
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 112 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"lint-staged": "^15.2.10",
"octokit": "^4.0.2",
"ofetch": "^1.3.4",
"oniguruma-to-js": "^0.2.5",
"oniguruma-to-js": "^0.3.0",
"p-limit": "^6.1.0",
"pnpm": "^9.9.0",
"rimraf": "^6.0.1",
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[0-9A-Fa-f]{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
"match": "\\\\(x\\h{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[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
"match": "\\\\(x\\h{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[0-9A-Fa-f]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
"match": "(\\\\x[\\h]{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[0-9A-Fa-f]{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
"match": "(\\\\x[\\h]{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])'[0-9A-Fa-f]*'",
"match": "([nNuU][xX]|[hHxX])'\\h*'",
"name": "constant.numeric.integer.hexadecimal.cobol"
},
{
"match": "([nNuU][xX]|[hHxX])'.*'",
"name": "invalid.illegal.hexadecimal.cobol"
},
{
"match": "([nNuU][xX]|[hHxX])\"[0-9A-Fa-f]*\"",
"match": "([nNuU][xX]|[hHxX])\"\\h*\"",
"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[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
"match": "\\\\(x\\h{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[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])",
"match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)",
"name": "constant.character.numeric.regexp"
},
{
Expand Down Expand Up @@ -1851,7 +1851,7 @@
"name": "constant.character.escape.backslash.regexp"
}
},
"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])|(\\\\.))",
"match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\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([0-9A-Fa-f]{8}|[0-9A-Fa-f]{4})",
"match": "\\\\[nrt\"\\\\]|\\\\u(\\h{8}|\\h{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}]]|(?:\\\\[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*(?=\\{|$)",
"begin": "\\s*((@)counter-style\\b)\\s+(?:(?i:\\b(decimal|none)\\b)|(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*))\\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}]]|(?:\\\\[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]))*)",
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)",
"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}]]|(?:\\\\[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]))*)",
"begin": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)",
"end": "(?=\\))",
"name": "entity.other.attribute-name.less",
"patterns": [
Expand Down Expand Up @@ -985,7 +985,7 @@
"name": "punctuation.definition.constant.less"
}
},
"match": "(#)([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})\\b",
"match": "(#)(\\h{3}|\\h{4}|\\h{6}|\\h{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}]]|(?:\\\\[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]))*)",
"match": "(?:--(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))+|-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)",
"name": "entity.other.counter-name.less"
},
{
Expand Down Expand Up @@ -1113,7 +1113,7 @@
"end": "(?=\\))",
"patterns": [
{
"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]))*)",
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)",
"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}]]|(?:\\\\[0-9A-Fa-f]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f0-9A-Fa-f]))+)",
"match": "\\s*(--)((?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))+)",
"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}]]|(?:\\\\[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]))*)",
"begin": "(@)(-?(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)",
"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}]|(?:\\\\[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]))*)",
"begin": "(@{1,2})([-]?([_a-z]|[^\\x{00}-\\x{7F}]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)",
"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}]]|(?:\\\\[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]))*)|(\\*))?([|])(?!=)"
"match": "(?:(-?(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)|(\\*))?([|])(?!=)"
},
"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}]]|(?:\\\\[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)",
"match": "\\b(var-)(-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)(?=\\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}]]|(?:\\\\[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]))*)*",
"match": "-?(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*(\\s+-?(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)*",
"name": "string.unquoted.less"
},
{
Expand Down Expand Up @@ -4607,7 +4607,7 @@
"name": "invalid.illegal.property-value.less"
},
{
"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]))*",
"match": "-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*",
"name": "support.constant.property-value.less"
},
{
Expand Down Expand Up @@ -4642,7 +4642,7 @@
"match": "(((\\+_?)?):)([\\s\\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]))*",
"match": "-?(?:[[-\\w][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[_a-zA-Z][^\\x{00}-\\x{9f}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*",
"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}]]|(?:\\\\[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]))*)",
"match": "(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\\\h{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f\\h]))*)",
"name": "entity.other.attribute-name.less"
},
{
Expand Down Expand Up @@ -5161,7 +5161,7 @@
"name": "constant.character.escape.newline.less"
},
{
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"match": "\\\\(\\h{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][0-9A-Fa-f][0-9A-Fa-f]",
"match": "\\\\[xX]\\h\\h",
"name": "constant.character.escape.hex.nim"
},
{
Expand Down Expand Up @@ -1128,7 +1128,7 @@
"name": "constant.numeric.float.decimal.nim"
},
{
"match": "\\b0[xX][0-9A-Fa-f][_0-9A-Fa-f]*'([fF](32|64|128)|[fFdD])",
"match": "\\b0[xX]\\h[_\\h]*'([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][0-9A-Fa-f][_0-9A-Fa-f]*)('(([iIuU](8|16|32|64))|[uU]))?",
"match": "\\b(0[xX]\\h[_\\h]*)('(([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][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]",
"match": "\\\\[uU]\\h\\h\\h\\h",
"name": "constant.character.escape.hex.nim"
},
{
"match": "\\\\[uU]\\{[0-9A-Fa-f]+\\}",
"match": "\\\\[uU]\\{\\h+\\}",
"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[0-9A-Fa-f]{4}|\\\\U[0-9A-Fa-f]{8}",
"match": "\\\\u\\h{4}|\\\\U\\h{8}",
"name": "constant.character.escape.objcpp"
},
{
Expand All @@ -3671,7 +3671,7 @@
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\x[0-9A-Fa-f]+",
"match": "\\\\x\\h+",
"name": "constant.character.escape.objcpp"
},
{
Expand Down Expand Up @@ -6524,7 +6524,7 @@
"name": "string.quoted.double.objcpp",
"patterns": [
{
"match": "\\\\u[0-9A-Fa-f]{4}|\\\\U[0-9A-Fa-f]{8}",
"match": "\\\\u\\h{4}|\\\\U\\h{8}",
"name": "constant.character.escape.objcpp"
},
{
Expand All @@ -6536,7 +6536,7 @@
"name": "constant.character.escape.objcpp"
},
{
"match": "\\\\x[0-9A-Fa-f]+",
"match": "\\\\x\\h+",
"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": "(#|[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": "(#|\\h{4}|\\h{8}|cr|lf|tab)(?:,(#|\\h{4}|\\h{8}|cr|lf|tab))*"
},
{
"match": "[^\\)]",
Expand All @@ -93,7 +93,7 @@
"name": "constant.numeric.float.powerquery"
},
"HexNumber": {
"match": "0(x|X)[0-9A-Fa-f]+",
"match": "0(x|X)\\h+",
"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][0-9A-Fa-f](?>_?[0-9A-Fa-f])*r?i?\\b",
"match": "\\b0[xX]\\h(?>_?\\h)*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[0-9A-Fa-f]{1,2}(?![0-9A-Fa-f])\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
"match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
"name": "constant.numeric.ruby"
},
{
Expand Down
8 changes: 4 additions & 4 deletions packages/tm-grammars/grammars/scss.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@
"name": "string.quoted.double.scss",
"patterns": [
{
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"match": "\\\\(\\h{1,6}|.)",
"name": "constant.character.escape.scss"
},
{
Expand All @@ -533,7 +533,7 @@
"name": "string.quoted.single.scss",
"patterns": [
{
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"match": "\\\\(\\h{1,6}|.)",
"name": "constant.character.escape.scss"
},
{
Expand Down Expand Up @@ -1748,7 +1748,7 @@
"name": "string.quoted.double.scss",
"patterns": [
{
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"match": "\\\\(\\h{1,6}|.)",
"name": "constant.character.escape.scss"
},
{
Expand All @@ -1772,7 +1772,7 @@
"name": "string.quoted.single.scss",
"patterns": [
{
"match": "\\\\([0-9A-Fa-f]{1,6}|.)",
"match": "\\\\(\\h{1,6}|.)",
"name": "constant.character.escape.scss"
},
{
Expand Down
Loading

0 comments on commit 58d17c0

Please sign in to comment.