Родитель
8610134389
Коммит
f6c23eabdd
|
@ -26,6 +26,7 @@ variables:
|
|||
lookBehindOf: '^of|{{nonPropertyLookBehind}}of'
|
||||
lookBehindTypeof: '^typeof|{{nonPropertyLookBehind}}typeof'
|
||||
lookBehindCase: '^case|{{nonPropertyLookBehind}}case'
|
||||
lookBehindImport: '^import|{{nonPropertyLookBehind}}import'
|
||||
matchingParenthesis: (\(([^\(\)]|(\([^\(\)]*\)))*\))
|
||||
matchingBraces: (\{([^\{\}]|(\{[^\{\}]*\}))*\})
|
||||
matchingBrackets: (\[([^\[\]]|(\[[^\[\]]*\]))*\])
|
||||
|
@ -865,6 +866,14 @@ repository:
|
|||
'2': { name: keyword.control.import.ts }
|
||||
end: (?=;|$|^)
|
||||
patterns:
|
||||
- include: '#comment'
|
||||
- include: '#string'
|
||||
- begin: (?<={{lookBehindImport}})(?!\s*["'])
|
||||
end: \bfrom\b
|
||||
endCaptures:
|
||||
'0': { name: keyword.control.from.ts }
|
||||
patterns:
|
||||
- include: '#import-export-declaration'
|
||||
- include: '#import-export-declaration'
|
||||
|
||||
export-declaration:
|
||||
|
|
|
@ -2693,6 +2693,35 @@
|
|||
<string>(?=;|$|^)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#comment</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<=^import|[^\._$[:alnum:]]import)(?!\s*["'])</string>
|
||||
<key>end</key>
|
||||
<string>\bfrom\b</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.from.ts</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#import-export-declaration</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#import-export-declaration</string>
|
||||
|
|
|
@ -2697,6 +2697,35 @@
|
|||
<string>(?=;|$|^)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#comment</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<=^import|[^\._$[:alnum:]]import)(?!\s*["'])</string>
|
||||
<key>end</key>
|
||||
<string>\bfrom\b</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.from.tsx</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#import-export-declaration</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#import-export-declaration</string>
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
import a
|
||||
from b;
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>import a
|
||||
^^^^^^
|
||||
source.ts meta.import.ts keyword.control.import.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^
|
||||
source.ts meta.import.ts variable.other.readwrite.alias.ts
|
||||
^^
|
||||
source.ts meta.import.ts
|
||||
> from b;
|
||||
^^^^
|
||||
source.ts meta.import.ts
|
||||
^^^^
|
||||
source.ts meta.import.ts keyword.control.from.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^
|
||||
source.ts meta.import.ts variable.other.readwrite.alias.ts
|
||||
^
|
||||
source.ts punctuation.terminator.statement.ts
|
|
@ -0,0 +1,2 @@
|
|||
import a
|
||||
from b;
|
Загрузка…
Ссылка в новой задаче