Make sure the typeparameters arent predicted when it is expression of type < number
Fixes #518
This commit is contained in:
Родитель
d7576f26c6
Коммит
e8b504c5f2
|
@ -59,7 +59,7 @@ repository:
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -577,7 +577,7 @@ repository:
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -784,7 +784,7 @@ repository:
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -1344,7 +1344,7 @@ repository:
|
|||
|siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
|
||||
|systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
|
||||
|title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
|
||||
|vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
|vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
captures:
|
||||
'1': { name: punctuation.accessor.ts }
|
||||
'2': { name: support.constant.dom.ts }
|
||||
|
@ -1457,12 +1457,12 @@ repository:
|
|||
'4': { name: support.function.dom.ts }
|
||||
|
||||
function-call:
|
||||
begin: (?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
end: (?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
begin: (?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
end: (?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
patterns:
|
||||
- name: meta.function-call.ts
|
||||
begin: (?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))
|
||||
end: (?=\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
end: (?=\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()
|
||||
patterns:
|
||||
- include: '#literal'
|
||||
- include: '#support-objects'
|
||||
|
@ -1499,7 +1499,7 @@ repository:
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
))
|
||||
captures:
|
||||
|
@ -1617,7 +1617,7 @@ repository:
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)))
|
||||
captures:
|
||||
|
@ -1747,7 +1747,7 @@ repository:
|
|||
) |
|
||||
# arrow function possible to detect only with => on same line
|
||||
(
|
||||
(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)? # typeparameters
|
||||
(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)? # typeparameters
|
||||
\(([^()]|\([^()]*\))*\) # parameteres
|
||||
(\s*:\s*(.)*)? # return type
|
||||
\s*=> # arrow operator
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -1787,7 +1787,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -2414,7 +2414,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -3820,7 +3820,7 @@
|
|||
|siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
|
||||
|systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
|
||||
|title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
|
||||
|vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
|vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -4017,9 +4017,9 @@
|
|||
<key>function-call</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<string>(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>end</key>
|
||||
<string>(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<string>(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -4028,7 +4028,7 @@
|
|||
<key>begin</key>
|
||||
<string>(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))</string>
|
||||
<key>end</key>
|
||||
<string>(?=\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<string>(?=\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -4125,7 +4125,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
))</string>
|
||||
<key>captures</key>
|
||||
|
@ -4421,7 +4421,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)))</string>
|
||||
<key>captures</key>
|
||||
|
@ -4765,7 +4765,7 @@
|
|||
) |
|
||||
# arrow function possible to detect only with => on same line
|
||||
(
|
||||
(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)? # typeparameters
|
||||
(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)? # typeparameters
|
||||
\(([^()]|\([^()]*\))*\) # parameteres
|
||||
(\s*:\s*(.)*)? # return type
|
||||
\s*=> # arrow operator
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -1791,7 +1791,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -2418,7 +2418,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)) |
|
||||
(:\s*(
|
||||
|
@ -3824,7 +3824,7 @@
|
|||
|siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
|
||||
|systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
|
||||
|title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
|
||||
|vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
|vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -4021,9 +4021,9 @@
|
|||
<key>function-call</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<string>(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>end</key>
|
||||
<string>(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<string>(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -4032,7 +4032,7 @@
|
|||
<key>begin</key>
|
||||
<string>(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\.\s*)*|(\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))</string>
|
||||
<key>end</key>
|
||||
<string>(?=\s*(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<string>(?=\s*(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\()</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -4129,7 +4129,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
))</string>
|
||||
<key>captures</key>
|
||||
|
@ -4367,7 +4367,7 @@
|
|||
((async\s*)?(
|
||||
([(]\s*(([)]\s*:)|([_$[:alpha:]][_$[:alnum:]]*\s*:)|(\.\.\.) )) |
|
||||
([<]\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s*[^=>])|(\s*[,]))) |
|
||||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
((<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)))</string>
|
||||
<key>captures</key>
|
||||
|
@ -4711,7 +4711,7 @@
|
|||
) |
|
||||
# arrow function possible to detect only with => on same line
|
||||
(
|
||||
(<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)? # typeparameters
|
||||
(<\s*[_$[:alpha:]\{\(]([^<>=]|=[^<]|\<\s*[_$[:alpha:]\{\(]([^=<>]|=[^<])+\>)+>\s*)? # typeparameters
|
||||
\(([^()]|\([^()]*\))*\) # parameteres
|
||||
(\s*:\s*(.)*)? # return type
|
||||
\s*=> # arrow operator
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
// @onlyOwnGrammar - As this has jsx
|
||||
(<a title={i >= 2 && i < 3 ? "first branch" : i > (j - 2) * 4 ? "second branch" : "third branch" } />)
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScriptReact.tmLanguage
|
||||
-----------------------------------
|
||||
>// @onlyOwnGrammar - As this has jsx
|
||||
^^
|
||||
source.tsx comment.line.double-slash.tsx punctuation.definition.comment.tsx
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
source.tsx comment.line.double-slash.tsx
|
||||
>(<a title={i >= 2 && i < 3 ? "first branch" : i > (j - 2) * 4 ? "second branch" : "third branch" } />)
|
||||
^
|
||||
source.tsx meta.brace.round.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx punctuation.definition.tag.begin.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx entity.name.tag.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx
|
||||
^^^^^
|
||||
source.tsx meta.tag.tsx entity.other.attribute-name.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx keyword.operator.assignment.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx punctuation.section.embedded.begin.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx variable.other.readwrite.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.relational.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx constant.numeric.decimal.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.logical.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx variable.other.readwrite.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.relational.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx constant.numeric.decimal.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.ternary.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx punctuation.definition.string.begin.tsx
|
||||
^^^^^^^^^^^^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx punctuation.definition.string.end.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.ternary.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx variable.other.readwrite.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.relational.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx meta.brace.round.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx variable.other.readwrite.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.arithmetic.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx constant.numeric.decimal.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx meta.brace.round.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.arithmetic.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx constant.numeric.decimal.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.ternary.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx punctuation.definition.string.begin.tsx
|
||||
^^^^^^^^^^^^^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx punctuation.definition.string.end.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx keyword.operator.ternary.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx punctuation.definition.string.begin.tsx
|
||||
^^^^^^^^^^^^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx string.quoted.double.tsx punctuation.definition.string.end.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.embedded.expression.tsx punctuation.section.embedded.end.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx
|
||||
^^
|
||||
source.tsx meta.tag.tsx punctuation.definition.tag.end.tsx
|
||||
^
|
||||
source.tsx meta.brace.round.tsx
|
|
@ -0,0 +1,2 @@
|
|||
// @onlyOwnGrammar - As this has jsx
|
||||
(<a title={i >= 2 && i < 3 ? "first branch" : i > (j - 2) * 4 ? "second branch" : "third branch" } />)
|
Загрузка…
Ссылка в новой задаче