Skip to content

Commit

Permalink
Fix the incorrectly detected arrow function type parameters which cou…
Browse files Browse the repository at this point in the history
…ld be just relational operations

Fixes #403
  • Loading branch information
sheetalkamat committed Jan 10, 2017
1 parent 8011e87 commit 2ba4658
Show file tree
Hide file tree
Showing 5 changed files with 1,519 additions and 15 deletions.
6 changes: 1 addition & 5 deletions TypeScript.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -1607,11 +1607,7 @@ repository:
)
) |
(
[<]\s*[_$[:alpha:]][_$[:alnum:]]*
(
(\s+extends\s*[^=>]) | # < typeparam extends
(\s*[,]) # < typeparam,
)
[<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
) |
# arrow function possible to detect only with => on same line
(
Expand Down
6 changes: 1 addition & 5 deletions TypeScript.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -4413,11 +4413,7 @@
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*
(
(\s+extends\s*[^=&gt;]) | # &lt; typeparam extends
(\s*[,]) # &lt; typeparam,
)
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
Expand Down
6 changes: 1 addition & 5 deletions TypeScriptReact.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -4395,11 +4395,7 @@
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*
(
(\s+extends\s*[^=&gt;]) | # &lt; typeparam extends
(\s*[,]) # &lt; typeparam,
)
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
Expand Down
Loading

0 comments on commit 2ba4658

Please sign in to comment.