This commit is contained in:
Sheetal Nandi 2016-08-31 17:09:03 -07:00
Родитель 4e252af92d
Коммит a883c3630e
4 изменённых файлов: 343 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,194 @@
original file
-----------------------------------
const a: { [key: string]: () => string } = null;
const b: { [key: string]: [string, () => string] } = null;
const c = "foobar";
const d = 5;
const e: any = null;
-----------------------------------
>const a: { [key: string]: () => string } = null;
^^^^^
source.ts meta.var.expr.ts storage.type.ts
^
source.ts meta.var.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts variable.other.readwrite.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.brace.square.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.indexer.parameter.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.brace.square.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.paren.cover.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.paren.cover.ts meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.paren.cover.ts meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.function.return.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.function.return.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.function.return.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.function.return.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts keyword.operator.assignment.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts constant.language.null.ts
^^^
source.ts
>const b: { [key: string]: [string, () => string] } = null;
^^^^^
source.ts meta.var.expr.ts storage.type.ts
^
source.ts meta.var.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts variable.other.readwrite.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.brace.square.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.indexer.parameter.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.indexer.declaration.ts meta.brace.square.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.brace.square.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.type.paren.cover.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.type.paren.cover.ts meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.type.paren.cover.ts meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.type.function.return.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.type.function.return.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.type.function.return.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts meta.type.tuple.ts meta.brace.square.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts meta.object.type.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts keyword.operator.assignment.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts constant.language.null.ts
^^^
source.ts
>const c = "foobar";
^^^^^
source.ts meta.var.expr.ts storage.type.ts
^
source.ts meta.var.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts variable.other.readwrite.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts keyword.operator.assignment.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts string.quoted.double.ts punctuation.definition.string.begin.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts string.quoted.double.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts string.quoted.double.ts punctuation.definition.string.end.ts
^^^
source.ts
>const d = 5;
^^^^^
source.ts meta.var.expr.ts storage.type.ts
^
source.ts meta.var.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts variable.other.readwrite.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts keyword.operator.assignment.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts constant.numeric.decimal.ts
^^^
source.ts
>const e: any = null;
^^^^^
source.ts meta.var.expr.ts storage.type.ts
^
source.ts meta.var.expr.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts variable.other.readwrite.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts keyword.operator.assignment.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts constant.language.null.ts
^^
source.ts

Просмотреть файл

@ -0,0 +1,138 @@
original file
-----------------------------------
var [] = 'fafa'.replace('blah');
console.log('hello');
var [] = 'fafa'.replace('<blah>');
console.log('hello');
while { while() {} }
-----------------------------------
>var [] = 'fafa'.replace('blah');
^^^
source.ts meta.var.expr.ts storage.type.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts punctuation.definition.binding-pattern.array.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts punctuation.definition.binding-pattern.array.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts keyword.operator.assignment.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^^^^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.end.ts
^^^^^^^^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^^^^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.end.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts meta.brace.round.ts
^^^
source.ts
>console.log('hello');
^^^^^^^^^^^
source.ts
^
source.ts meta.brace.round.ts
^
source.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^^^^^
source.ts string.quoted.single.ts
^
source.ts string.quoted.single.ts punctuation.definition.string.end.ts
^
source.ts meta.brace.round.ts
^^^
source.ts
>
^^
source.ts
>var [] = 'fafa'.replace('<blah>');
^^^
source.ts meta.var.expr.ts storage.type.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts punctuation.definition.binding-pattern.array.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts punctuation.definition.binding-pattern.array.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts keyword.operator.assignment.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^^^^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.end.ts
^^^^^^^^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^^^^^^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts string.quoted.single.ts punctuation.definition.string.end.ts
^
source.ts meta.var.expr.ts meta.array-binding-pattern-variable.ts meta.brace.round.ts
^^^
source.ts
>console.log('hello');
^^^^^^^^^^^
source.ts
^
source.ts meta.brace.round.ts
^
source.ts string.quoted.single.ts punctuation.definition.string.begin.ts
^^^^^
source.ts string.quoted.single.ts
^
source.ts string.quoted.single.ts punctuation.definition.string.end.ts
^
source.ts meta.brace.round.ts
^^^
source.ts
>while { while() {} }
^^^^^
source.ts keyword.control.loop.ts
^
source.ts
^
source.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.block.ts
^^^^^
source.ts meta.block.ts keyword.control.loop.ts
^
source.ts meta.block.ts meta.brace.round.ts
^
source.ts meta.block.ts meta.brace.round.ts
^
source.ts meta.block.ts
^
source.ts meta.block.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.block.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.block.ts
^
source.ts meta.block.ts punctuation.definition.block.ts

5
tests/cases/Issue178.ts Normal file
Просмотреть файл

@ -0,0 +1,5 @@
const a: { [key: string]: () => string } = null;
const b: { [key: string]: [string, () => string] } = null;
const c = "foobar";
const d = 5;
const e: any = null;

6
tests/cases/Issue203.ts Normal file
Просмотреть файл

@ -0,0 +1,6 @@
var [] = 'fafa'.replace('blah');
console.log('hello');
var [] = 'fafa'.replace('<blah>');
console.log('hello');
while { while() {} }