Родитель
72cb5cd533
Коммит
7db029d755
|
@ -2220,10 +2220,13 @@ repository:
|
|||
type-fn-type-parameters:
|
||||
patterns:
|
||||
# constructor type
|
||||
- name: meta.type.constructor.ts
|
||||
match: '{{startOfIdentifier}}(new)\b(?=\s*\<)'
|
||||
captures:
|
||||
'1': { name: keyword.control.new.ts }
|
||||
- begin: '{{startOfIdentifier}}(new)\b(?=\s*\<)'
|
||||
beginCaptures:
|
||||
'1': { name: meta.type.constructor.ts keyword.control.new.ts }
|
||||
end: (?<=>)
|
||||
patterns:
|
||||
- include: '#comment'
|
||||
- include: '#type-parameters'
|
||||
- name: meta.type.constructor.ts
|
||||
begin: '{{startOfIdentifier}}(new)\b\s*(?=\()'
|
||||
beginCaptures:
|
||||
|
|
|
@ -6628,18 +6628,29 @@
|
|||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.type.constructor.ts</string>
|
||||
<key>match</key>
|
||||
<key>begin</key>
|
||||
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)</string>
|
||||
<key>captures</key>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.new.ts</string>
|
||||
<string>meta.type.constructor.ts keyword.control.new.ts</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<=>)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#comment</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#type-parameters</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
|
|
|
@ -6574,18 +6574,29 @@
|
|||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.type.constructor.tsx</string>
|
||||
<key>match</key>
|
||||
<key>begin</key>
|
||||
<string>(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)</string>
|
||||
<key>captures</key>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.new.tsx</string>
|
||||
<string>meta.type.constructor.tsx keyword.control.new.tsx</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<=>)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#comment</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#type-parameters</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
export interface ObjectAllocator {
|
||||
getTokenConstructor(): new <TKind extends SyntaxKind>(kind: TKind, pos?: number, end?: number) => Token<TKind>;
|
||||
}
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>export interface ObjectAllocator {
|
||||
^^^^^^
|
||||
source.ts meta.interface.ts keyword.control.export.ts
|
||||
^
|
||||
source.ts meta.interface.ts
|
||||
^^^^^^^^^
|
||||
source.ts meta.interface.ts storage.type.interface.ts
|
||||
^
|
||||
source.ts meta.interface.ts
|
||||
^^^^^^^^^^^^^^^
|
||||
source.ts meta.interface.ts entity.name.type.interface.ts
|
||||
^
|
||||
source.ts meta.interface.ts
|
||||
^
|
||||
source.ts meta.interface.ts punctuation.definition.block.ts
|
||||
^^
|
||||
source.ts meta.interface.ts
|
||||
> getTokenConstructor(): new <TKind extends SyntaxKind>(kind: TKind, pos?: number, end?: number) => Token<TKind>;
|
||||
^^^^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.definition.method.ts entity.name.function.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts keyword.operator.type.annotation.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts
|
||||
^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.constructor.ts keyword.control.new.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts
|
||||
^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.parameters.ts entity.name.type.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.parameters.ts
|
||||
^^^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.parameters.ts storage.modifier.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.parameters.ts
|
||||
^^^^^^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.parameters.ts entity.name.type.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
|
||||
^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts variable.parameter.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts keyword.operator.type.annotation.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts
|
||||
^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts punctuation.separator.parameter.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts
|
||||
^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts variable.parameter.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts keyword.operator.optional.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts keyword.operator.type.annotation.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts
|
||||
^^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts punctuation.separator.parameter.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts
|
||||
^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts variable.parameter.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts keyword.operator.optional.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts keyword.operator.type.annotation.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts
|
||||
^^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts
|
||||
^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.return.ts storage.type.function.arrow.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.return.ts
|
||||
^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.return.ts entity.name.type.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.return.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts
|
||||
^^^^^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.return.ts meta.type.parameters.ts entity.name.type.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.method.declaration.ts meta.return.type.ts meta.type.function.return.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts
|
||||
^
|
||||
source.ts meta.interface.ts punctuation.terminator.statement.ts
|
||||
^^
|
||||
source.ts meta.interface.ts
|
||||
>}
|
||||
^
|
||||
source.ts meta.interface.ts punctuation.definition.block.ts
|
|
@ -0,0 +1,3 @@
|
|||
export interface ObjectAllocator {
|
||||
getTokenConstructor(): new <TKind extends SyntaxKind>(kind: TKind, pos?: number, end?: number) => Token<TKind>;
|
||||
}
|
Загрузка…
Ссылка в новой задаче