|
|
|
@ -0,0 +1,224 @@
|
|
|
|
|
original file
|
|
|
|
|
-----------------------------------
|
|
|
|
|
type Resolve = () => number;
|
|
|
|
|
|
|
|
|
|
class Test {
|
|
|
|
|
first(values: Map<string, Resolve>): number {
|
|
|
|
|
return values.has('a') ? values.get('a')!() : 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
second(): string {
|
|
|
|
|
return 'foo';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
|
|
Grammar: TypeScript.tmLanguage
|
|
|
|
|
-----------------------------------
|
|
|
|
|
>type Resolve = () => number;
|
|
|
|
|
^^^^
|
|
|
|
|
source.ts meta.type.declaration.ts storage.type.type.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts
|
|
|
|
|
^^^^^^^
|
|
|
|
|
source.ts meta.type.declaration.ts entity.name.type.alias.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts keyword.operator.assignment.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts meta.type.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.type.declaration.ts meta.type.function.return.ts storage.type.function.arrow.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.type.declaration.ts meta.type.function.return.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.type.declaration.ts meta.type.function.return.ts support.type.primitive.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts punctuation.terminator.statement.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts
|
|
|
|
|
>
|
|
|
|
|
^^
|
|
|
|
|
source.ts
|
|
|
|
|
>class Test {
|
|
|
|
|
^^^^^
|
|
|
|
|
source.ts meta.class.ts storage.type.class.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
^^^^
|
|
|
|
|
source.ts meta.class.ts entity.name.type.class.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts punctuation.definition.block.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
> first(values: Map<string, Resolve>): number {
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.definition.method.ts entity.name.function.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts variable.parameter.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts keyword.operator.type.annotation.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
|
|
|
|
|
^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts meta.type.parameters.ts support.type.primitive.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts meta.type.parameters.ts punctuation.separator.comma.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts meta.type.parameters.ts
|
|
|
|
|
^^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts meta.type.parameters.ts entity.name.type.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts meta.type.parameters.ts punctuation.definition.typeparameters.end.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts keyword.operator.type.annotation.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts support.type.primitive.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
> return values.has('a') ? values.get('a')!() : 0;
|
|
|
|
|
^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts keyword.control.flow.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.function-call.ts variable.other.object.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.function-call.ts punctuation.accessor.ts
|
|
|
|
|
^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.function-call.ts support.function.dom.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts punctuation.definition.string.begin.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts punctuation.definition.string.end.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts keyword.operator.ternary.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.function-call.ts variable.other.object.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.function-call.ts punctuation.accessor.ts
|
|
|
|
|
^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.function-call.ts support.function.dom.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts punctuation.definition.string.begin.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts punctuation.definition.string.end.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts keyword.operator.logical.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts keyword.operator.ternary.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts constant.numeric.decimal.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts punctuation.terminator.statement.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
> }
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
>
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
> second(): string {
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.definition.method.ts entity.name.function.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts keyword.operator.type.annotation.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts support.type.primitive.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.return.type.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
> return 'foo';
|
|
|
|
|
^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^^^^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts keyword.control.flow.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts punctuation.definition.string.begin.ts
|
|
|
|
|
^^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.single.ts punctuation.definition.string.end.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts punctuation.terminator.statement.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
> }
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
|
|
|
|
|
^^
|
|
|
|
|
source.ts meta.class.ts
|
|
|
|
|
>}
|
|
|
|
|
^
|
|
|
|
|
source.ts meta.class.ts punctuation.definition.block.ts
|