Skip to content

Commit f698a98

Browse files
committed
Increase one more level of <> detection in typeparameters
Fixes #744
1 parent e3dad98 commit f698a98

File tree

5 files changed

+276
-89
lines changed

5 files changed

+276
-89
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ variables:
6161
lookBehindOfObjectMemberPossiblyMultilineArrow: (?<=:)
6262
# Identifier start | matching braces | matching parenthesis | matching square brackets
6363
typeParamersStart: ([_$[:alpha:]]|{{matchingBraces}}|{{matchingParenthesis}}|{{matchingBrackets}})
64-
typeParameters: (<\s*{{typeParamersStart}}([^=<>]|=[^<]|\<\s*{{typeParamersStart}}([^=<>]|=[^<])*\>)*>\s*)
64+
typeParameters: (<\s*{{typeParamersStart}}([^=<>]|=[^<]|\<\s*{{typeParamersStart}}([^=<>]|=[^<]|\<\s*{{typeParamersStart}}([^=<>]|=[^<])*\>)*\>)*>\s*)
6565
# Identifier start | matching braces | matching parenthesis | matching square brackets | matching strings
6666
typeArgumentsStart: (((keyof|infer|typeof)\s+)|(({{identifier}}|{{matchingBraces}}|{{matchingParenthesis}}|{{matchingBrackets}}|(\'[^\']*\')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))
6767
typeArgumentsInnerExpressionPart: '[^<>\(]|{{matchingParenthesis}}|(?<==)\>'

0 commit comments

Comments
 (0)