Skip to content

Commit 3dc70d2

Browse files
committed
Fix function validateWhereClauseStructure
1 parent 36599e2 commit 3dc70d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/src/server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,11 +520,10 @@ function validateWhereClauseStructure(node: SyntaxNode): Diagnostic[] {
520520

521521
for (let i = 0; i < currentNode.childCount; i++) {
522522
const child = currentNode.child(i);
523-
if (child?.type === ";" && i + 2 < currentNode.childCount) {
523+
if (child?.type === ";" && i + 1 < currentNode.childCount) {
524524
const nextChild = currentNode.child(i + 1);
525-
const followingChild = currentNode.child(i + 2);
526525

527-
if (nextChild?.type === "id" && followingChild?.type === "=") {
526+
if (nextChild?.child(0)?.type === "pattern" && nextChild?.child(1)?.type === "=") {
528527
hasProperStructure = true;
529528
break;
530529
}

0 commit comments

Comments
 (0)