Skip to content

Commit

Permalink
Fix bug in Flow arrow function detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Thom1729 committed Mar 6, 2022
1 parent 86d3b80 commit 0116964
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions extensions/flow_types.syntax-extension
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ contexts:

flow-function-type-arguments:
- match: \<(?!<)
scope: punctuation.definition.generic.begin.js
scope: punctuation.definition.generic.begin.js region.redish
set:
- - match: (?=[\]()};,`])
pop: true
Expand Down Expand Up @@ -524,13 +524,18 @@ contexts:

flow-type-generic-arguments:
- match: '<'
scope: punctuation.definition.generic.begin.js
scope: punctuation.definition.generic.begin.js region.greenish
set:
- meta_scope: meta.generic.js
- match: '>'
scope: punctuation.definition.generic.end.js
pop: true
- include: flow-type-list
- - meta_scope: meta.generic.js
- match: '>'
scope: punctuation.definition.generic.end.js
pop: true
- match: ','
scope: punctuation.separator.comma.js
push: flow-type
- match: (?=\S)
fail: flow-arrow-function-return-type
- flow-type

flow-type-generic-parameters:
- match: '<'
Expand Down

0 comments on commit 0116964

Please sign in to comment.