This commit is contained in:
Sheetal Nandi 2016-08-30 12:27:34 -07:00
Родитель e038ac8f44
Коммит 4b6badfbca
27 изменённых файлов: 1308 добавлений и 89 удалений

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

@ -167,14 +167,13 @@ repository:
- include: '#literal'
- include: '#function-declaration'
- include: '#class-or-interface-declaration'
- include: '#cast'
- include: '#arrow-function'
- include: '#paren-expression'
- include: '#ternary-expression'
- include: '#cast'
- include: '#new-expr'
- include: '#arrow-body'
- include: '#object-literal'
- include: '#expression-operator'
- include: '#imply-operator'
- include: '#operators'
- include: '#function-call'
@ -946,10 +945,6 @@ repository:
- name: keyword.operator.is.ts
match: \bis\b
imply-operator:
name: storage.type.function.arrow.ts
match: =>
operators:
patterns:
- name: keyword.operator.assignment.compound.ts
@ -973,6 +968,33 @@ repository:
- name: keyword.operator.arithmetic.ts
match: '%|\*|/|-|\+'
arrow-function:
patterns:
# TODO: type parameter of arrow
- name: meta.arrow.ts
match: (\basync)(?=\s*[<(])
captures:
'1': { name: storage.modifier.async.ts }
# paramters of the arrow
- name: meta.arrow.ts
match: ([_$[:alpha:]][_$[:alnum:]]*)\s*(=>)
captures:
'1': { name: variable.parameter.ts }
'2': { name: storage.type.function.arrow.ts }
- name: meta.arrow.ts
begin: (?x)(?<=return|throw|yield|await|async|[=(,:>])\s*(?=\(([^()]+|\([^()]*\))*\)\s*=>)
end: =>
endCaptures:
'0': { name: storage.type.function.arrow.ts }
patterns:
- include: '#function-parameters'
# TODO: return type of the arrow
# arrow operator for anything that doesnt get captured by above regex
- name: storage.type.function.arrow.ts
match: =>
# body
- include: '#arrow-body'
paren-expression:
begin: \(
beginCaptures:

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

@ -180,6 +180,78 @@
</dict>
</array>
</dict>
<key>arrow-function</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.ts</string>
</dict>
</dict>
<key>match</key>
<string>(\basync)(?=\s*[&lt;(])</string>
<key>name</key>
<string>meta.arrow.ts</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>variable.parameter.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.type.function.arrow.ts</string>
</dict>
</dict>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(=&gt;)</string>
<key>name</key>
<string>meta.arrow.ts</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)(?&lt;=return|throw|yield|await|async|[=(,:&gt;])\s*(?=\(([^()]+|\([^()]*\))*\)\s*=&gt;)</string>
<key>end</key>
<string>=&gt;</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>storage.type.function.arrow.ts</string>
</dict>
</dict>
<key>name</key>
<string>meta.arrow.ts</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#function-parameters</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>=&gt;</string>
<key>name</key>
<string>storage.type.function.arrow.ts</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-body</string>
</dict>
</array>
</dict>
<key>boolean-literal</key>
<dict>
<key>patterns</key>
@ -1087,6 +1159,14 @@
<key>include</key>
<string>#class-or-interface-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#cast</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-function</string>
</dict>
<dict>
<key>include</key>
<string>#paren-expression</string>
@ -1095,18 +1175,10 @@
<key>include</key>
<string>#ternary-expression</string>
</dict>
<dict>
<key>include</key>
<string>#cast</string>
</dict>
<dict>
<key>include</key>
<string>#new-expr</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-body</string>
</dict>
<dict>
<key>include</key>
<string>#object-literal</string>
@ -1115,10 +1187,6 @@
<key>include</key>
<string>#expression-operator</string>
</dict>
<dict>
<key>include</key>
<string>#imply-operator</string>
</dict>
<dict>
<key>include</key>
<string>#operators</string>
@ -1447,13 +1515,6 @@
</dict>
</array>
</dict>
<key>imply-operator</key>
<dict>
<key>match</key>
<string>=&gt;</string>
<key>name</key>
<string>storage.type.function.arrow.ts</string>
</dict>
<key>import-declaration</key>
<dict>
<key>begin</key>

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

@ -172,13 +172,12 @@ repository:
- include: '#literal'
- include: '#function-declaration'
- include: '#class-or-interface-declaration'
- include: '#arrow-function'
- include: '#paren-expression'
- include: '#ternary-expression'
- include: '#new-expr'
- include: '#arrow-body'
- include: '#object-literal'
- include: '#expression-operator'
- include: '#imply-operator'
- include: '#operators'
- include: '#function-call'
@ -701,7 +700,7 @@ repository:
type-annotation:
name: meta.type.annotation.tsx
begin: ":"
end: (?=$|[,);\}\]]|//)|(?==[^>])|(?<=[\}>\]\)]|[a-zA-Z_$])\s*(?=\{)
end: (?=$|[,);\}\]]|//)|(?==[^>])|(?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)
patterns:
- include: '#expression-operator'
- include: '#type'
@ -936,10 +935,6 @@ repository:
- name: keyword.operator.is.tsx
match: \bis\b
imply-operator:
name: storage.type.function.arrow.tsx
match: =>
operators:
patterns:
- name: keyword.operator.assignment.compound.tsx
@ -963,6 +958,33 @@ repository:
- name: keyword.operator.arithmetic.tsx
match: '%|\*|/|-|\+'
arrow-function:
patterns:
# TODO: type parameter of arrow
- name: meta.arrow.ts
match: (\basync)(?=\s*[<(])
captures:
'1': { name: storage.modifier.async.tsx }
# paramters of the arrow
- name: meta.arrow.tsx
match: ([_$[:alpha:]][_$[:alnum:]]*)\s*(=>)
captures:
'1': { name: variable.parameter.tsx }
'2': { name: storage.type.function.arrow.tsx }
- name: meta.arrow.tsx
begin: (?x)(?<=return|throw|yield|await|async|[=(,:>])\s*(?=\(([^()]+|\([^()]*\))*\)\s*=>)
end: =>
endCaptures:
'0': { name: storage.type.function.arrow.tsx }
patterns:
- include: '#function-parameters'
# TODO: return type of the arrow
# arrow operator for anything that doesnt get captured by above regex
- name: storage.type.function.arrow.tsx
match: =>
# body
- include: '#arrow-body'
paren-expression:
begin: \(
beginCaptures:

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

@ -180,6 +180,78 @@
</dict>
</array>
</dict>
<key>arrow-function</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
</dict>
<key>match</key>
<string>(\basync)(?=\s*[&lt;(])</string>
<key>name</key>
<string>meta.arrow.ts</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>variable.parameter.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.type.function.arrow.tsx</string>
</dict>
</dict>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(=&gt;)</string>
<key>name</key>
<string>meta.arrow.tsx</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)(?&lt;=return|throw|yield|await|async|[=(,:&gt;])\s*(?=\(([^()]+|\([^()]*\))*\)\s*=&gt;)</string>
<key>end</key>
<string>=&gt;</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>storage.type.function.arrow.tsx</string>
</dict>
</dict>
<key>name</key>
<string>meta.arrow.tsx</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#function-parameters</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>=&gt;</string>
<key>name</key>
<string>storage.type.function.arrow.tsx</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-body</string>
</dict>
</array>
</dict>
<key>boolean-literal</key>
<dict>
<key>patterns</key>
@ -1059,6 +1131,10 @@
<key>include</key>
<string>#class-or-interface-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-function</string>
</dict>
<dict>
<key>include</key>
<string>#paren-expression</string>
@ -1071,10 +1147,6 @@
<key>include</key>
<string>#new-expr</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-body</string>
</dict>
<dict>
<key>include</key>
<string>#object-literal</string>
@ -1083,10 +1155,6 @@
<key>include</key>
<string>#expression-operator</string>
</dict>
<dict>
<key>include</key>
<string>#imply-operator</string>
</dict>
<dict>
<key>include</key>
<string>#operators</string>
@ -1415,13 +1483,6 @@
</dict>
</array>
</dict>
<key>imply-operator</key>
<dict>
<key>match</key>
<string>=&gt;</string>
<key>name</key>
<string>storage.type.function.arrow.tsx</string>
</dict>
<key>import-declaration</key>
<dict>
<key>begin</key>
@ -3726,7 +3787,7 @@
<key>begin</key>
<string>:</string>
<key>end</key>
<string>(?=$|[,);\}\]]|//)|(?==[^&gt;])|(?&lt;=[\}&gt;\]\)]|[a-zA-Z_$])\s*(?=\{)</string>
<string>(?=$|[,);\}\]]|//)|(?==[^&gt;])|(?&lt;=[\}&gt;\]\)]|[_$[:alpha:]])\s*(?=\{)</string>
<key>name</key>
<string>meta.type.annotation.tsx</string>
<key>patterns</key>

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

@ -94,17 +94,35 @@ function f(x: string | ((value: string) => number)) {
^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.brace.round.ts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts
^^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.brace.round.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts storage.type.function.arrow.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.object.member.ts meta.block.ts
^

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

@ -0,0 +1,320 @@
original file
-----------------------------------
class Foo {
bar(a: Foo, b: string) { }
}
function foo(a: Foo, b: string) { }
const bar = function (a: Foo, b: string) { }
const baz = (a: Foo, b: string) => { };
const qux = {
bar(a: Foo, b: string) { },
set bar2(x: string) { }
}
-----------------------------------
>class Foo {
^^^^^
source.ts meta.declaration.object.ts storage.type.class.ts
^
source.ts meta.declaration.object.ts
^^^
source.ts meta.declaration.object.ts meta.object.name.ts entity.name.class.ts
^
source.ts meta.declaration.object.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts punctuation.definition.block.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts
> bar(a: Foo, b: string) { }
^^^^
source.ts meta.declaration.object.ts meta.object.body.ts
^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts entity.name.function.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts
>}
^
source.ts meta.declaration.object.ts meta.object.body.ts punctuation.definition.block.ts
^^
source.ts
>
^^
source.ts
>function foo(a: Foo, b: string) { }
^^^^^^^^
source.ts meta.function.ts storage.type.function.ts
^
source.ts meta.function.ts
^^^
source.ts meta.function.ts entity.name.function.ts
^
source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^^^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.function.ts meta.parameters.ts
^
source.ts meta.function.ts meta.parameters.ts
^
source.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.function.ts
^
source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.function.ts meta.block.ts
^
source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts
>
^^
source.ts
>const bar = function (a: Foo, b: string) { }
^^^^^
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 meta.function.ts storage.type.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
>
^^
source.ts
>const baz = (a: Foo, b: string) => { };
^^^^^
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 meta.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts
^^^
source.ts
>
^^
source.ts
>const qux = {
^^^^^
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 meta.object-literal.ts punctuation.definition.block.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts
> bar(a: Foo, b: string) { },
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts entity.name.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts
> set bar2(x: string) { }
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts storage.type.property.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts entity.name.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts
>}
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.object-literal.ts punctuation.definition.block.ts

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

@ -0,0 +1,112 @@
original file
-----------------------------------
class x {
public SomeMethod() {
}
public OtherMethod() { }
public SomeMethod = () => { }
}
-----------------------------------
>class x {
^^^^^
source.ts meta.declaration.object.ts storage.type.class.ts
^
source.ts meta.declaration.object.ts
^
source.ts meta.declaration.object.ts meta.object.name.ts entity.name.class.ts
^
source.ts meta.declaration.object.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts punctuation.definition.block.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts
> public SomeMethod() {
^^^^
source.ts meta.declaration.object.ts meta.object.body.ts
^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts storage.modifier.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts
^^^^^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts entity.name.function.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
> }
^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts
> public OtherMethod() { }
^^^^
source.ts meta.declaration.object.ts meta.object.body.ts
^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts storage.modifier.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts
^^^^^^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts entity.name.function.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts
>
^^
source.ts meta.declaration.object.ts meta.object.body.ts
> public SomeMethod = () => { }
^^^^
source.ts meta.declaration.object.ts meta.object.body.ts
^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts storage.modifier.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts
^^^^^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts variable.object.property.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts keyword.operator.assignment.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.arrow.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.arrow.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.field.declaration.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts
>}
^
source.ts meta.declaration.object.ts meta.object.body.ts punctuation.definition.block.ts

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

@ -0,0 +1,74 @@
original file
-----------------------------------
let f = async (x) => {};
let f2 = async function(x) {};
-----------------------------------
>let f = async (x) => {};
^^^
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 meta.arrow.ts storage.modifier.async.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts
^^^
source.ts
>let f2 = async function(x) {};
^^^
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 meta.function.ts storage.modifier.async.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts
^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts storage.type.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts

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

@ -0,0 +1,48 @@
original file
-----------------------------------
() => (/s/);
() => /s/;
-----------------------------------
>() => (/s/);
^
source.ts meta.brace.round.ts
^
source.ts meta.brace.round.ts
^
source.ts
^^
source.ts storage.type.function.arrow.ts
^
source.ts
^
source.ts meta.brace.round.ts
^
source.ts string.regex.ts punctuation.definition.string.begin.ts
^
source.ts string.regex.ts
^
source.ts string.regex.ts punctuation.definition.string.end.ts
^
source.ts meta.brace.round.ts
^^^
source.ts
>() => /s/;
^
source.ts meta.brace.round.ts
^
source.ts meta.brace.round.ts
^
source.ts
^^
source.ts storage.type.function.arrow.ts
^
source.ts string.regex.ts
^
source.ts string.regex.ts punctuation.definition.string.begin.ts
^
source.ts string.regex.ts
^
source.ts string.regex.ts punctuation.definition.string.end.ts
^^
source.ts

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

@ -67,17 +67,17 @@ function myFunction(param1, param2, number, string, boolean) {
^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts keyword.operator.assignment.ts
^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.brace.round.ts
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^^^^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.brace.round.ts
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts storage.type.function.arrow.ts
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.function.ts meta.block.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^

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

@ -0,0 +1,106 @@
original file
-----------------------------------
const trim = module.exports = str => trim.trailing(trim.leading(str));
const trim = module.exports = function(str) {
return trim.trailing(trim.leading(str));
}
-----------------------------------
>const trim = module.exports = str => trim.trailing(trim.leading(str));
^^^^^
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 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 meta.arrow.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts storage.type.function.arrow.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 meta.brace.round.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 meta.brace.round.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 meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.brace.round.ts
^^^
source.ts
>
^^
source.ts
>const trim = module.exports = function(str) {
^^^^^
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 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 meta.function.ts storage.type.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts
> return trim.trailing(trim.leading(str));
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts keyword.control.flow.ts
^^^^^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts meta.brace.round.ts
^^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts meta.brace.round.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts meta.brace.round.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts meta.brace.round.ts
^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts
>}
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.function.ts meta.block.ts punctuation.definition.block.ts

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

@ -129,18 +129,26 @@ class Thing<^^T, ^^U> {
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts string.quoted.double.ts punctuation.definition.string.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
^^
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
^^^^^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts
^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts storage.type.function.arrow.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.block.ts
^
@ -297,18 +305,26 @@ class Thing<^^T, ^^U> {
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts string.quoted.double.ts punctuation.definition.string.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
^^
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
^^^^^^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts
^^^^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.brace.round.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts
^^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts storage.type.function.arrow.ts
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts meta.block.ts meta.block.ts
^

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

@ -0,0 +1,50 @@
original file
-----------------------------------
app.get('/test/', (req, res) => {
});
-----------------------------------
>app.get('/test/', (req, res) => {
^^^^^^^
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
^
source.ts meta.arrow.ts
^
source.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^
source.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.arrow.ts meta.parameters.ts
^
source.ts meta.arrow.ts meta.parameters.ts
^^^
source.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.arrow.ts
^^
source.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.block.ts
^
source.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.block.ts
>});
^
source.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.brace.round.ts
^^
source.ts

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

@ -0,0 +1,70 @@
original file
-----------------------------------
async function x() {
}
const y = async () => { }
-----------------------------------
>async function x() {
^^^^^
source.ts meta.function.ts storage.modifier.async.ts
^
source.ts meta.function.ts
^^^^^^^^
source.ts meta.function.ts storage.type.function.ts
^
source.ts meta.function.ts
^
source.ts meta.function.ts entity.name.function.ts
^
source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.function.ts
^
source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.function.ts meta.block.ts
>
^^
source.ts meta.function.ts meta.block.ts
>}
^
source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts
>const y = async () => { }
^^^^^
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 meta.arrow.ts storage.modifier.async.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts

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

@ -0,0 +1,108 @@
original file
-----------------------------------
const selectDictionary = (dictionaries: StoredDictionaries, lang:string) => {
}
function selectDictionary(dictionaries: StoredDictionaries, lang:string) {
}
-----------------------------------
>const selectDictionary = (dictionaries: StoredDictionaries, lang:string) => {
^^^^^
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 meta.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^^^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts
^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
>
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
>}
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
>
^^
source.ts
>function selectDictionary(dictionaries: StoredDictionaries, lang:string) {
^^^^^^^^
source.ts meta.function.ts storage.type.function.ts
^
source.ts meta.function.ts
^^^^^^^^^^^^^^^^
source.ts meta.function.ts entity.name.function.ts
^
source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^^^^^^^^^^
source.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^^^^^^^^^^^^^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.function.ts meta.parameters.ts
^
source.ts meta.function.ts meta.parameters.ts
^^^^
source.ts meta.function.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts
^^^^^^
source.ts meta.function.ts meta.parameters.ts meta.type.annotation.ts support.type.primitive.ts
^
source.ts meta.function.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.function.ts
^
source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.function.ts meta.block.ts
>
^^
source.ts meta.function.ts meta.block.ts
>}
^
source.ts meta.function.ts meta.block.ts punctuation.definition.block.ts

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

@ -0,0 +1,80 @@
original file
-----------------------------------
return this.travelWorld((cell: Cell) => {
cell.live = Math.random() < this.initialLifeProbability;
return cell;
});
-----------------------------------
> return this.travelWorld((cell: Cell) => {
^^^^^^^^^^^^
source.ts
^^^^^^
source.ts keyword.control.flow.ts
^
source.ts
^^^^
source.ts variable.language.this.ts
^^^^^^^^^^^^
source.ts
^
source.ts meta.brace.round.ts
^
source.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^^^^
source.ts meta.arrow.ts meta.parameters.ts variable.parameter.ts
^
source.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^
source.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts
^^^^
source.ts meta.arrow.ts meta.parameters.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.arrow.ts
^^
source.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.block.ts
^
source.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.block.ts
> cell.live = Math.random() < this.initialLifeProbability;
^^^^^^^^^^^^^^^^^^^^^^^^^^
source.ts meta.block.ts
^
source.ts meta.block.ts keyword.operator.assignment.ts
^^^^^^^^^^^^
source.ts meta.block.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 keyword.operator.relational.ts
^
source.ts meta.block.ts
^^^^
source.ts meta.block.ts variable.language.this.ts
^^^^^^^^^^^^^^^^^^^^^^^^^^
source.ts meta.block.ts
> return cell;
^^^^^^^^^^^^^^^^
source.ts meta.block.ts
^^^^^^
source.ts meta.block.ts keyword.control.flow.ts
^^^^^^^^
source.ts meta.block.ts
> });
^^^^^^^^^^^^
source.ts meta.block.ts
^
source.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.brace.round.ts
^^
source.ts

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

@ -140,15 +140,15 @@ var ^^obj = {
^
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 meta.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.brace.round.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.brace.round.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.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 meta.arrow.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts storage.type.function.arrow.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts
^

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

@ -227,26 +227,30 @@ class Test {
source.ts meta.function.ts meta.block.ts
^
source.ts meta.function.ts meta.block.ts meta.brace.round.ts
^^^^^
source.ts meta.function.ts meta.block.ts
^^^^
source.ts meta.function.ts meta.block.ts meta.arrow.ts variable.parameter.ts
^
source.ts meta.function.ts meta.block.ts meta.arrow.ts
^^
source.ts meta.function.ts meta.block.ts storage.type.function.arrow.ts
source.ts meta.function.ts meta.block.ts meta.arrow.ts storage.type.function.arrow.ts
^^^^^^^^^^^^
source.ts meta.function.ts meta.block.ts
^
source.ts meta.function.ts meta.block.ts meta.brace.round.ts
^
source.ts meta.function.ts meta.block.ts meta.brace.round.ts
^^
^
source.ts meta.function.ts meta.block.ts
^
source.ts meta.function.ts meta.block.ts meta.arrow.ts
^
source.ts meta.function.ts meta.block.ts meta.brace.round.ts
source.ts meta.function.ts meta.block.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.begin.ts
^
source.ts meta.function.ts meta.block.ts meta.brace.round.ts
source.ts meta.function.ts meta.block.ts meta.arrow.ts meta.parameters.ts punctuation.definition.parameters.end.ts
^
source.ts meta.function.ts meta.block.ts
source.ts meta.function.ts meta.block.ts meta.arrow.ts
^^
source.ts meta.function.ts meta.block.ts storage.type.function.arrow.ts
source.ts meta.function.ts meta.block.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.function.ts meta.block.ts
^^^^^

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

@ -0,0 +1,14 @@
class Foo {
bar(a: Foo, b: string) { }
}
function foo(a: Foo, b: string) { }
const bar = function (a: Foo, b: string) { }
const baz = (a: Foo, b: string) => { };
const qux = {
bar(a: Foo, b: string) { },
set bar2(x: string) { }
}

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

@ -0,0 +1,7 @@
class x {
public SomeMethod() {
}
public OtherMethod() { }
public SomeMethod = () => { }
}

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

@ -0,0 +1,2 @@
let f = async (x) => {};
let f2 = async function(x) {};

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

@ -0,0 +1,2 @@
() => (/s/);
() => /s/;

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

@ -0,0 +1,5 @@
const trim = module.exports = str => trim.trailing(trim.leading(str));
const trim = module.exports = function(str) {
return trim.trailing(trim.leading(str));
}

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

@ -0,0 +1,2 @@
app.get('/test/', (req, res) => {
});

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

@ -0,0 +1,4 @@
async function x() {
}
const y = async () => { }

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

@ -0,0 +1,7 @@
const selectDictionary = (dictionaries: StoredDictionaries, lang:string) => {
}
function selectDictionary(dictionaries: StoredDictionaries, lang:string) {
}

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

@ -0,0 +1,4 @@
return this.travelWorld((cell: Cell) => {
cell.live = Math.random() < this.initialLifeProbability;
return cell;
});