File tree 5 files changed +41
-3
lines changed
5 files changed +41
-3
lines changed Original file line number Diff line number Diff line change @@ -631,7 +631,7 @@ repository:
631
631
variable-initializer :
632
632
patterns :
633
633
# if it is assignment with expression on same line, use end of line as end of scope
634
- - begin : (?<!=|!)(=)(?!=)(?=\s*\S)
634
+ - begin : (?<!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=>\s*$)
635
635
beginCaptures :
636
636
' 1 ' : { name: keyword.operator.assignment.ts }
637
637
end : (?=$|^|[,);}\]]|(\s+(of|in)\s+))
Original file line number Diff line number Diff line change 1994
1994
<array >
1995
1995
<dict >
1996
1996
<key >begin </key >
1997
- <string >(?< !=|!)(=)(?!=)(?=\s*\S) </string >
1997
+ <string >(?< !=|!)(=)(?!=)(?=\s*\S)(?!\s*.*= > \s*$) </string >
1998
1998
<key >beginCaptures </key >
1999
1999
<dict >
2000
2000
<key >1 </key >
Original file line number Diff line number Diff line change 1998
1998
<array >
1999
1999
<dict >
2000
2000
<key >begin </key >
2001
- <string >(?< !=|!)(=)(?!=)(?=\s*\S) </string >
2001
+ <string >(?< !=|!)(=)(?!=)(?=\s*\S)(?!\s*.*= > \s*$) </string >
2002
2002
<key >beginCaptures </key >
2003
2003
<dict >
2004
2004
<key >1 </key >
Original file line number Diff line number Diff line change
1
+ original file
2
+ -----------------------------------
3
+ const t = () =>
4
+ `a`
5
+ -----------------------------------
6
+
7
+ Grammar: TypeScript.tmLanguage
8
+ -----------------------------------
9
+ >const t = () =>
10
+ ^^^^^
11
+ source.ts meta.var.expr.ts storage.type.ts
12
+ ^
13
+ source.ts meta.var.expr.ts
14
+ ^
15
+ source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts
16
+ ^
17
+ source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
18
+ ^
19
+ source.ts meta.var.expr.ts keyword.operator.assignment.ts
20
+ ^
21
+ source.ts meta.var.expr.ts meta.arrow.ts
22
+ ^
23
+ source.ts meta.var.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
24
+ ^
25
+ source.ts meta.var.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
26
+ ^
27
+ source.ts meta.var.expr.ts meta.arrow.ts
28
+ ^^
29
+ source.ts meta.var.expr.ts meta.arrow.ts storage.type.function.arrow.ts
30
+ >`a`
31
+ ^
32
+ source.ts meta.var.expr.ts string.template.ts punctuation.definition.string.template.begin.ts
33
+ ^
34
+ source.ts meta.var.expr.ts string.template.ts
35
+ ^
36
+ source.ts meta.var.expr.ts string.template.ts punctuation.definition.string.template.end.ts
Original file line number Diff line number Diff line change
1
+ const t = ( ) =>
2
+ `a`
You can’t perform that action at this time.
0 commit comments