Handle object-literal members so that it can handle computed names and string literal keys better
Fixes #476
This commit is contained in:
Родитель
7f81759f60
Коммит
13645189e9
|
@ -1579,31 +1579,24 @@ repository:
|
|||
patterns:
|
||||
- include: '#comment'
|
||||
- include: '#object-literal-method-declaration'
|
||||
- name: meta.object.member.ts
|
||||
begin: (?=(?:(?:\'.*\')|(?:\".*\")|(?:\[([^\[\]]|\[[^\[\]]*\])+\]))\s*:)
|
||||
end: (?=,|\})
|
||||
- name: meta.object.member.ts meta.object-literal.key.ts
|
||||
begin: (?=\[)
|
||||
end: (?=:)
|
||||
patterns:
|
||||
- name: meta.object-literal.key.ts
|
||||
begin: (?=(?:(?:\'.*\')|(?:\".*\")|(?:\[([^\[\]]|\[[^\[\]]*\])+\]))\s*:)
|
||||
end: ':'
|
||||
endCaptures:
|
||||
'0': { name: punctuation.separator.key-value.ts }
|
||||
patterns:
|
||||
- include: '#string'
|
||||
- include: '#array-literal'
|
||||
- include: '#expression'
|
||||
- include: '#array-literal'
|
||||
- name: meta.object.member.ts meta.object-literal.key.ts
|
||||
begin: (?=[\'\"])
|
||||
end: (?=:)
|
||||
patterns:
|
||||
- include: '#string'
|
||||
- name: meta.object.member.ts
|
||||
begin: (?![_$[:alpha:]])([[:digit:]]+)\s*(:)
|
||||
beginCaptures:
|
||||
match: (?![_$[:alpha:]])([[:digit:]]+)\s*(?=:)
|
||||
captures:
|
||||
'0': { name: meta.object-literal.key.ts }
|
||||
'1': { name: constant.numeric.decimal.ts }
|
||||
'2': { name: punctuation.separator.key-value.ts }
|
||||
end: (?=,|\})
|
||||
patterns:
|
||||
- include: '#expression'
|
||||
- name: meta.object.member.ts
|
||||
begin: |-
|
||||
(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*(
|
||||
match: |-
|
||||
(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:\s*(
|
||||
((async\s+)?(
|
||||
(function\s*[(<]) |
|
||||
(function\s+) |
|
||||
|
@ -1615,21 +1608,14 @@ repository:
|
|||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)))
|
||||
beginCaptures:
|
||||
captures:
|
||||
'0': { name: meta.object-literal.key.ts }
|
||||
'1': { name: entity.name.function.ts }
|
||||
'2': { name: punctuation.separator.key-value.ts }
|
||||
end: (?=,|\})
|
||||
patterns:
|
||||
- include: '#expression'
|
||||
- name: meta.object.member.ts
|
||||
begin: (?:[_$[:alpha:]][_$[:alnum:]]*)\s*(:)
|
||||
beginCaptures:
|
||||
match: (?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)
|
||||
captures:
|
||||
'0': { name: meta.object-literal.key.ts }
|
||||
'1': { name: punctuation.separator.key-value.ts }
|
||||
end: (?=,|\})
|
||||
patterns:
|
||||
- include: '#expression'
|
||||
- name: meta.object.member.ts
|
||||
begin: \.\.\.
|
||||
beginCaptures:
|
||||
|
@ -1641,8 +1627,18 @@ repository:
|
|||
match: ([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$)
|
||||
captures:
|
||||
'1': { name: variable.other.readwrite.ts }
|
||||
- include: '#object-member-body'
|
||||
- include: '#punctuation-comma'
|
||||
|
||||
object-member-body:
|
||||
name: meta.object.member.ts
|
||||
begin: ':'
|
||||
beginCaptures:
|
||||
'0': { name: meta.object-literal.key.ts punctuation.separator.key-value.ts }
|
||||
end: (?=,|\})
|
||||
patterns:
|
||||
- include: '#expression'
|
||||
|
||||
expression-operators:
|
||||
patterns:
|
||||
- name: keyword.control.flow.ts
|
||||
|
|
|
@ -4343,52 +4343,40 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.ts</string>
|
||||
<string>meta.object.member.ts meta.object-literal.key.ts</string>
|
||||
<key>begin</key>
|
||||
<string>(?=(?:(?:\'.*\')|(?:\".*\")|(?:\[([^\[\]]|\[[^\[\]]*\])+\]))\s*:)</string>
|
||||
<string>(?=\[)</string>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<string>(?=:)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object-literal.key.ts</string>
|
||||
<key>begin</key>
|
||||
<string>(?=(?:(?:\'.*\')|(?:\".*\")|(?:\[([^\[\]]|\[[^\[\]]*\])+\]))\s*:)</string>
|
||||
<key>end</key>
|
||||
<string>:</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.ts</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#array-literal</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>include</key>
|
||||
<string>#array-literal</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.ts meta.object-literal.key.ts</string>
|
||||
<key>begin</key>
|
||||
<string>(?=[\'\"])</string>
|
||||
<key>end</key>
|
||||
<string>(?=:)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
<string>#string</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.ts</string>
|
||||
<key>begin</key>
|
||||
<string>(?![_$[:alpha:]])([[:digit:]]+)\s*(:)</string>
|
||||
<key>beginCaptures</key>
|
||||
<key>match</key>
|
||||
<string>(?![_$[:alpha:]])([[:digit:]]+)\s*(?=:)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
|
@ -4400,27 +4388,13 @@
|
|||
<key>name</key>
|
||||
<string>constant.numeric.decimal.ts</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.ts</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.ts</string>
|
||||
<key>begin</key>
|
||||
<string>(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*(
|
||||
<key>match</key>
|
||||
<string>(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:\s*(
|
||||
((async\s+)?(
|
||||
(function\s*[(<]) |
|
||||
(function\s+) |
|
||||
|
@ -4432,7 +4406,7 @@
|
|||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)))</string>
|
||||
<key>beginCaptures</key>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
|
@ -4444,49 +4418,23 @@
|
|||
<key>name</key>
|
||||
<string>entity.name.function.ts</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.ts</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.ts</string>
|
||||
<key>begin</key>
|
||||
<string>(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(:)</string>
|
||||
<key>beginCaptures</key>
|
||||
<key>match</key>
|
||||
<string>(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object-literal.key.ts</string>
|
||||
</dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.ts</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
|
@ -4525,12 +4473,40 @@
|
|||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#object-member-body</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#punctuation-comma</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>object-member-body</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.ts</string>
|
||||
<key>begin</key>
|
||||
<string>:</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object-literal.key.ts punctuation.separator.key-value.ts</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>expression-operators</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
|
|
|
@ -4289,52 +4289,40 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.tsx</string>
|
||||
<string>meta.object.member.tsx meta.object-literal.key.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?=(?:(?:\'.*\')|(?:\".*\")|(?:\[([^\[\]]|\[[^\[\]]*\])+\]))\s*:)</string>
|
||||
<string>(?=\[)</string>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<string>(?=:)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object-literal.key.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?=(?:(?:\'.*\')|(?:\".*\")|(?:\[([^\[\]]|\[[^\[\]]*\])+\]))\s*:)</string>
|
||||
<key>end</key>
|
||||
<string>:</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.tsx</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#string</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#array-literal</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>include</key>
|
||||
<string>#array-literal</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.tsx meta.object-literal.key.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?=[\'\"])</string>
|
||||
<key>end</key>
|
||||
<string>(?=:)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
<string>#string</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?![_$[:alpha:]])([[:digit:]]+)\s*(:)</string>
|
||||
<key>beginCaptures</key>
|
||||
<key>match</key>
|
||||
<string>(?![_$[:alpha:]])([[:digit:]]+)\s*(?=:)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
|
@ -4346,27 +4334,13 @@
|
|||
<key>name</key>
|
||||
<string>constant.numeric.decimal.tsx</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.tsx</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*(
|
||||
<key>match</key>
|
||||
<string>(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:\s*(
|
||||
((async\s+)?(
|
||||
(function\s*[(<]) |
|
||||
(function\s+) |
|
||||
|
@ -4378,7 +4352,7 @@
|
|||
((<([^<>=]|=[^<]|\<([^=<>]|=[^<])+\>)+>\s*)?\(([^()]|\([^()]*\))*\)(\s*:\s*(.)*)?\s*=>)
|
||||
))
|
||||
)))</string>
|
||||
<key>beginCaptures</key>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
|
@ -4390,49 +4364,23 @@
|
|||
<key>name</key>
|
||||
<string>entity.name.function.tsx</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.tsx</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(:)</string>
|
||||
<key>beginCaptures</key>
|
||||
<key>match</key>
|
||||
<string>(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object-literal.key.tsx</string>
|
||||
</dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.key-value.tsx</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
|
@ -4471,12 +4419,40 @@
|
|||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#object-member-body</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#punctuation-comma</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>object-member-body</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object.member.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>:</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.object-literal.key.tsx punctuation.separator.key-value.tsx</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=,|\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#expression</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>expression-operators</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
|
|
|
@ -0,0 +1,192 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
class Bug {
|
||||
static asdf(o, o2) {
|
||||
Bug.asdf("", '`')
|
||||
return {
|
||||
[
|
||||
"a"
|
||||
]:
|
||||
[
|
||||
Bug.asdf("", '`')
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>class Bug {
|
||||
^^^^^
|
||||
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
|
||||
> static asdf(o, o2) {
|
||||
^
|
||||
source.ts meta.class.ts
|
||||
^^^^^^
|
||||
source.ts meta.class.ts storage.modifier.ts
|
||||
^
|
||||
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 punctuation.separator.parameter.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.parameters.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 punctuation.definition.parameters.end.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.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
|
||||
> Bug.asdf("", '`')
|
||||
^^
|
||||
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 entity.name.function.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.double.ts punctuation.definition.string.begin.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts string.quoted.double.ts punctuation.definition.string.end.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts punctuation.separator.comma.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 meta.brace.round.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts
|
||||
> return {
|
||||
^^
|
||||
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 meta.objectliteral.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts punctuation.definition.block.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts
|
||||
> [
|
||||
^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts meta.brace.square.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts
|
||||
> "a"
|
||||
^^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts string.quoted.double.ts punctuation.definition.string.begin.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts string.quoted.double.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts string.quoted.double.ts punctuation.definition.string.end.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts
|
||||
> ]:
|
||||
^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts meta.array.literal.ts meta.brace.square.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts punctuation.separator.key-value.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts
|
||||
> [
|
||||
^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts meta.brace.square.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts
|
||||
> Bug.asdf("", '`')
|
||||
^^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts
|
||||
^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts meta.function-call.ts variable.other.object.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts meta.function-call.ts punctuation.accessor.ts
|
||||
^^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts meta.function-call.ts entity.name.function.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts meta.brace.round.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts string.quoted.double.ts punctuation.definition.string.begin.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts string.quoted.double.ts punctuation.definition.string.end.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts punctuation.separator.comma.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts string.quoted.single.ts punctuation.definition.string.begin.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts string.quoted.single.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts string.quoted.single.ts punctuation.definition.string.end.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts meta.brace.round.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts
|
||||
> ]
|
||||
^^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts meta.array.literal.ts meta.brace.square.ts
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts
|
||||
> };
|
||||
^^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts meta.object.member.ts
|
||||
^
|
||||
source.ts meta.class.ts meta.method.declaration.ts meta.block.ts meta.objectliteral.ts punctuation.definition.block.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
|
||||
>}
|
||||
^
|
||||
source.ts meta.class.ts punctuation.definition.block.ts
|
|
@ -181,9 +181,9 @@ for (var fileName of fs.readdirSync('cases')) {
|
|||
const outputFileName = path.join(generatedFolder, parsedFileName.name + '.txt');
|
||||
const { markerScopes, wholeBaseline } = getScopesAtMarkers(text, grammar);
|
||||
if (markerScopes) {
|
||||
fs.writeFile(outputFileName, markerScopes, "utf8");
|
||||
fs.writeFileSync(outputFileName, markerScopes, "utf8");
|
||||
}
|
||||
|
||||
const outputBaselineName = path.join(generatedFolder, parsedFileName.name + '.baseline.txt');
|
||||
fs.writeFile(outputBaselineName, wholeBaseline, "utf8");
|
||||
fs.writeFileSync(outputBaselineName, wholeBaseline, "utf8");
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
class Bug {
|
||||
static asdf(o, o2) {
|
||||
Bug.asdf("", '`')
|
||||
return {
|
||||
[
|
||||
"a"
|
||||
]:
|
||||
[
|
||||
Bug.asdf("", '`')
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
}
|
Загрузка…
Ссылка в новой задаче