Fix incorrect multi line variable declaration capture for ","
Fixes #635
This commit is contained in:
Родитель
88217b1c7d
Коммит
7148a4da6b
|
@ -249,7 +249,7 @@ repository:
|
|||
- begin: (,)\s*(?!\S)
|
||||
beginCaptures:
|
||||
'1': { name: punctuation.separator.comma.ts }
|
||||
end: (?<!,)((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))
|
||||
end: (?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))
|
||||
patterns:
|
||||
- include: '#comment'
|
||||
- include: '#destructuring-variable'
|
||||
|
|
|
@ -448,7 +448,7 @@
|
|||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<!,)((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))</string>
|
||||
<string>(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
@ -452,7 +452,7 @@
|
|||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<!,)((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$))</string>
|
||||
<string>(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
let a: number,
|
||||
b: number,
|
||||
c: number;
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>let a: number,
|
||||
^^^
|
||||
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 meta.type.annotation.ts keyword.operator.type.annotation.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
|
||||
^^^^^^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts support.type.primitive.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts punctuation.separator.comma.ts
|
||||
> b: number,
|
||||
^^^^
|
||||
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 meta.type.annotation.ts keyword.operator.type.annotation.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
|
||||
^^^^^^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts support.type.primitive.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts punctuation.separator.comma.ts
|
||||
> c: number;
|
||||
^^^^
|
||||
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 meta.type.annotation.ts keyword.operator.type.annotation.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
|
||||
^^^^^^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts support.type.primitive.ts
|
||||
^
|
||||
source.ts punctuation.terminator.statement.ts
|
|
@ -0,0 +1,3 @@
|
|||
let a: number,
|
||||
b: number,
|
||||
c: number;
|
Загрузка…
Ссылка в новой задаче