Родитель
06a03eb510
Коммит
b80b7509a7
|
@ -1226,10 +1226,11 @@ repository:
|
|||
- include: '#import-export-clause'
|
||||
|
||||
import-export-assert-clause:
|
||||
begin: '{{startOfIdentifier}}(assert)\s*(\{)'
|
||||
begin: '{{startOfIdentifier}}(?:(with)|(assert))\s*(\{)'
|
||||
beginCaptures:
|
||||
'1': { name: keyword.control.assert.ts }
|
||||
'2': { name: punctuation.definition.block.ts }
|
||||
'1': { name: keyword.control.with.ts }
|
||||
'2': { name: keyword.control.assert.ts }
|
||||
'3': { name: punctuation.definition.block.ts }
|
||||
end: \}
|
||||
endCaptures:
|
||||
'0': { name: punctuation.definition.block.ts }
|
||||
|
|
|
@ -3923,15 +3923,20 @@
|
|||
<key>import-export-assert-clause</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(assert)\s*(\{)</string>
|
||||
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(with)|(assert))\s*(\{)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.assert.ts</string>
|
||||
<string>keyword.control.with.ts</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.assert.ts</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.block.ts</string>
|
||||
|
|
|
@ -3945,15 +3945,20 @@
|
|||
<key>import-export-assert-clause</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(assert)\s*(\{)</string>
|
||||
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(with)|(assert))\s*(\{)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.assert.tsx</string>
|
||||
<string>keyword.control.with.tsx</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.assert.tsx</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.block.tsx</string>
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
import foo from "./foo.json" with { type: "json" };
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>import foo from "./foo.json" with { type: "json" };
|
||||
^^^^^^
|
||||
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
|
||||
^^^^
|
||||
source.ts meta.import.ts keyword.control.from.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^
|
||||
source.ts meta.import.ts string.quoted.double.ts punctuation.definition.string.begin.ts
|
||||
^^^^^^^^^^
|
||||
source.ts meta.import.ts string.quoted.double.ts
|
||||
^
|
||||
source.ts meta.import.ts string.quoted.double.ts punctuation.definition.string.end.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^^^^
|
||||
source.ts meta.import.ts keyword.control.with.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^
|
||||
source.ts meta.import.ts punctuation.definition.block.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^^^^
|
||||
source.ts meta.import.ts meta.object-literal.key.ts
|
||||
^
|
||||
source.ts meta.import.ts punctuation.separator.key-value.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^
|
||||
source.ts meta.import.ts string.quoted.double.ts punctuation.definition.string.begin.ts
|
||||
^^^^
|
||||
source.ts meta.import.ts string.quoted.double.ts
|
||||
^
|
||||
source.ts meta.import.ts string.quoted.double.ts punctuation.definition.string.end.ts
|
||||
^
|
||||
source.ts meta.import.ts
|
||||
^
|
||||
source.ts meta.import.ts punctuation.definition.block.ts
|
||||
^
|
||||
source.ts punctuation.terminator.statement.ts
|
|
@ -0,0 +1 @@
|
|||
import foo from "./foo.json" with { type: "json" };
|
Загрузка…
Ссылка в новой задаче