fix(sql): preserve consecutive Oracle PL/SQL blocks

Closes #6843
This commit is contained in:
t8y2 committed 2026-08-21 05:04:02 +00:00
1 parent 0ba2021181
commit 2d321b3537
2 files changed
+70

No files matched your search

@@ -1952,6 +1952,7 @@ function oraclePlSqlTokens(sql: string): OraclePlSqlToken[] {
function previousWordToken(tokens: Array<{ kind: "word" | "semicolon"; value: string }>, index: number): string | null {
for (let i = index - 1; i >= 0; i -= 1) {
if (tokens[i].kind === "semicolon") return null;
if (tokens[i].kind === "word") return tokens[i].value;
}
return null;
@@ -1959,6 +1960,7 @@ function previousWordToken(tokens: Array<{ kind: "word" | "semicolon"; value: st
function nextWordToken(tokens: Array<{ kind: "word" | "semicolon"; value: string }>, index: number): string | null {
for (let i = index + 1; i < tokens.length; i += 1) {
if (tokens[i].kind === "semicolon") return null;
if (tokens[i].kind === "word") return tokens[i].value;
}
return null;