Adding test case for when case block starts on new line
This commit is contained in:
Родитель
6e4b81f40f
Коммит
0ec5ae9ca9
|
@ -0,0 +1,62 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
switch (0) {
|
||||
case 0: {
|
||||
const zero = 0;
|
||||
return zero;
|
||||
}
|
||||
}
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>switch (0) {
|
||||
^^^^^^
|
||||
source.ts switch-statement.expr.ts switch-expression.expr.ts keyword.control.switch.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-expression.expr.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-expression.expr.ts meta.brace.round.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-expression.expr.ts constant.numeric.decimal.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-expression.expr.ts meta.brace.round.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts punctuation.definition.block.ts
|
||||
^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts
|
||||
> case 0: {
|
||||
^^^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts
|
||||
^^^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts case-clause.expr.ts keyword.control.switch.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts case-clause.expr.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts case-clause.expr.ts constant.numeric.decimal.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts case-clause.expr.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts meta.object-literal.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts meta.object-literal.ts punctuation.definition.block.ts
|
||||
^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts meta.object-literal.ts
|
||||
> const zero = 0;
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts meta.object-literal.ts
|
||||
> return zero;
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts meta.object-literal.ts
|
||||
> }
|
||||
^^^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts meta.object-literal.ts
|
||||
^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts meta.object-literal.ts punctuation.definition.block.ts
|
||||
^^
|
||||
source.ts switch-statement.expr.ts switch-block.expr.ts
|
||||
>}
|
||||
^
|
||||
source.ts switch-statement.expr.ts punctuation.definition.block.ts
|
|
@ -0,0 +1,6 @@
|
|||
switch (0) {
|
||||
case 0: {
|
||||
const zero = 0;
|
||||
return zero;
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче