Skip to content

Commit 42950d8

Browse files
committed
Wrap cases in curly braces
1 parent e1f3add commit 42950d8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

server/src/server.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ function analyzeSemanticTokens(
15321532
walkTree(node, (currentNode) => {
15331533
// Map ScrapScript syntax to semantic token types
15341534
switch (currentNode.type) {
1535-
case "id":
1535+
case "id": {
15361536
const text = getNodeText(document, currentNode);
15371537
let tokenType = 6; // variable
15381538
if (BUILT_IN_FUNCTIONS.includes(text)) {
@@ -1548,7 +1548,8 @@ function analyzeSemanticTokens(
15481548
0,
15491549
);
15501550
break;
1551-
case "op":
1551+
}
1552+
case "op": {
15521553
builder.push(
15531554
currentNode.startPosition.row,
15541555
currentNode.startPosition.column,
@@ -1557,7 +1558,8 @@ function analyzeSemanticTokens(
15571558
0,
15581559
);
15591560
break;
1560-
case "tag":
1561+
}
1562+
case "tag": {
15611563
builder.push(
15621564
currentNode.startPosition.row,
15631565
currentNode.startPosition.column,
@@ -1566,7 +1568,8 @@ function analyzeSemanticTokens(
15661568
0,
15671569
);
15681570
break;
1569-
case "number":
1571+
}
1572+
case "number": {
15701573
builder.push(
15711574
currentNode.startPosition.row,
15721575
currentNode.startPosition.column,
@@ -1575,7 +1578,8 @@ function analyzeSemanticTokens(
15751578
0,
15761579
);
15771580
break;
1578-
case "text":
1581+
}
1582+
case "text": {
15791583
builder.push(
15801584
currentNode.startPosition.row,
15811585
currentNode.startPosition.column,
@@ -1584,6 +1588,7 @@ function analyzeSemanticTokens(
15841588
0,
15851589
);
15861590
break;
1591+
}
15871592
}
15881593
});
15891594
}

0 commit comments

Comments
 (0)