Skip to content

Commit f7490c7

Browse files
committed
Add function validateNodeBy
1 parent 981e802 commit f7490c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/src/server.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,13 @@ function limitDiagnostics(
297297
return diagnostics.slice(0, maxNumberOfProblems);
298298
}
299299

300+
function validateNodeBy(
301+
node: SyntaxNode,
302+
callback: (node: SyntaxNode) => Diagnostic[]
303+
): Diagnostic[] {
304+
return walkTreeCollecting(node, callback).flat();
305+
}
306+
300307
// ===== Enhanced Validation =====
301308
export function validateScrapScript(
302309
text: string,

0 commit comments

Comments
 (0)