Родитель
7e4ccfde81
Коммит
15b157d42e
|
@ -136,7 +136,7 @@ variables:
|
|||
(:\s*(=>|{{matchingParenthesis}}|(<[^<>]*>)|[^<>(),=])+={{functionOrArrowLookup}})
|
||||
arrowFunctionEnd: (?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))
|
||||
regexpTail: ([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])
|
||||
completeRegexp: \/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/{{regexpTail}})
|
||||
completeRegexp: \/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/{{regexpTail}})
|
||||
|
||||
patterns:
|
||||
- include: '#directives'
|
||||
|
|
|
@ -4115,7 +4115,7 @@
|
|||
<key>name</key>
|
||||
<string>string.regexp.ts</string>
|
||||
<key>begin</key>
|
||||
<string>(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<string>(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
|
@ -8076,7 +8076,7 @@
|
|||
<key>name</key>
|
||||
<string>string.regexp.ts</string>
|
||||
<key>begin</key>
|
||||
<string>((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<string>((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
|
|
|
@ -4137,7 +4137,7 @@
|
|||
<key>name</key>
|
||||
<string>string.regexp.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<string>(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
|
@ -8024,7 +8024,7 @@
|
|||
<key>name</key>
|
||||
<string>string.regexp.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<string>((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
let a = /foo[]bar/;
|
||||
let b = /foo[^]bar/;
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>let a = /foo[]bar/;
|
||||
^^^
|
||||
source.ts meta.var.expr.ts storage.type.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts keyword.operator.assignment.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts punctuation.definition.string.begin.ts
|
||||
^^^
|
||||
source.ts meta.var.expr.ts string.regexp.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts constant.other.character-class.set.regexp punctuation.definition.character-class.regexp
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts constant.other.character-class.set.regexp punctuation.definition.character-class.regexp
|
||||
^^^
|
||||
source.ts meta.var.expr.ts string.regexp.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts punctuation.definition.string.end.ts
|
||||
^
|
||||
source.ts punctuation.terminator.statement.ts
|
||||
>let b = /foo[^]bar/;
|
||||
^^^
|
||||
source.ts meta.var.expr.ts storage.type.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts keyword.operator.assignment.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts punctuation.definition.string.begin.ts
|
||||
^^^
|
||||
source.ts meta.var.expr.ts string.regexp.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts constant.other.character-class.set.regexp punctuation.definition.character-class.regexp
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts constant.other.character-class.set.regexp keyword.operator.negation.regexp
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts constant.other.character-class.set.regexp punctuation.definition.character-class.regexp
|
||||
^^^
|
||||
source.ts meta.var.expr.ts string.regexp.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts string.regexp.ts punctuation.definition.string.end.ts
|
||||
^
|
||||
source.ts punctuation.terminator.statement.ts
|
|
@ -0,0 +1,2 @@
|
|||
let a = /foo[]bar/;
|
||||
let b = /foo[^]bar/;
|
Загрузка…
Ссылка в новой задаче