Skip to content

Commit 662fb8c

Browse files
committed
Cleanup snippet migration output
1 parent a9599f3 commit 662fb8c

20 files changed

+129
-259
lines changed

core/snippets/snippets/caseStatement.snippet

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
name: caseStatement
2+
description: Case statement
23
phrase: case
4+
insertionScope: branch
5+
6+
$0.wrapperScope: statement
37
---
48

5-
language: javascript | java
9+
language: javascript | java | cpp | c | csharp
610
-
711
case $1:
812
$0
13+
break;
914
---
1015

1116
language: python

core/snippets/snippets/caseStatement_CONFLICT.snippet

Lines changed: 0 additions & 14 deletions
This file was deleted.

core/snippets/snippets/elseIfStatement.snippet

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: elseIfStatement
2-
phrase: elif
3-
insertionScope: statement
2+
phrase: elsif
3+
insertionScope: ifStatement
44

5-
$1.wrapperPhrase: elif cond
5+
$1.wrapperPhrase: elsif cond
66
$1.wrapperScope: statement
7-
$0.wrapperPhrase: elif
7+
$0.wrapperPhrase: elsif
88
$0.wrapperScope: statement
99
---
1010

11-
language: javascript | java
11+
language: javascript | cpp | c | java | csharp
1212
-
1313
else if ($1) {
1414
$0

core/snippets/snippets/elseIfStatement_CONFLICT.snippet

Lines changed: 0 additions & 18 deletions
This file was deleted.

core/snippets/snippets/elseStatement.snippet

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: elseStatement
2+
description: Else statement
23
phrase: else
3-
insertionScope: statement
4+
insertionScope: branch
45

56
$0.wrapperPhrase: else
67
$0.wrapperScope: statement
78
---
89

9-
language: javascript | java
10+
language: javascript | java | cpp | c | csharp
1011
-
1112
else {
1213
$0

core/snippets/snippets/elseStatement_CONFLICT.snippet

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,42 @@
11
name: forEachStatement
2-
phrase: for each
2+
phrase: foreign
33
insertionScope: statement
4+
5+
$body.wrapperPhrase: foreign
6+
$body.wrapperScope: statement
47
---
58

69
language: javascript
10+
11+
$name.insertionFormatter: PRIVATE_CAMEL_CASE
712
-
8-
for (const $1 of $2) {
9-
$0
13+
for (const $name of $iterable) {
14+
$body
1015
}
1116
---
1217

1318
language: java
19+
20+
$name.insertionFormatter: PRIVATE_CAMEL_CASE
1421
-
15-
for (final $1 : $2) {
16-
$0
22+
for (final $name : $iterable) {
23+
$body
1724
}
1825
---
1926

2027
language: python
28+
29+
$name.insertionFormatter: SNAKE_CASE
30+
-
31+
for $name in $iterable:
32+
$body
33+
---
34+
35+
language: shellscript
36+
37+
$name.insertionFormatter: SNAKE_CASE
2138
-
22-
for $1 in $2:
23-
$0
39+
for $name in $iterable; do
40+
$body
41+
done
2442
---

core/snippets/snippets/forEachStatement_CONFLICT.snippet

Lines changed: 0 additions & 33 deletions
This file was deleted.

core/snippets/snippets/ifStatement.snippet

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,28 @@ name: ifStatement
22
phrase: if
33
insertionScope: statement
44

5-
$1.wrapperPhrase: if cond
6-
$1.wrapperScope: statement
7-
$0.wrapperPhrase: if
8-
$0.wrapperScope: statement
5+
$condition.wrapperPhrase: condition
6+
$condition.wrapperScope: statement
7+
$consequence.wrapperPhrase: if
8+
$consequence.wrapperScope: statement
99
---
1010

11-
language: javascript | java
11+
language: javascript | java | cpp | c | csharp
1212
-
13-
if ($1) {
14-
$0
13+
if (${condition/^([^;]*);?$/$1/}) {
14+
$consequence
1515
}
1616
---
1717

1818
language: python
1919
-
20-
if $1:
21-
$0
20+
if $condition:
21+
$consequence
22+
---
23+
24+
language: shellscript
25+
-
26+
if $condition; then
27+
$consequence
28+
fi
2229
---

core/snippets/snippets/ifStatement_CONFLICT.snippet

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)