Skip to content

Commit 2fc9056

Browse files
committed
Add function validateNodeBy
1 parent 3e9543e commit 2fc9056

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
@@ -304,6 +304,13 @@ function limitDiagnostics(
304304
return diagnostics.slice(0, maxNumberOfProblems);
305305
}
306306

307+
function validateNodeBy(
308+
node: SyntaxNode,
309+
callback: (node: SyntaxNode) => Diagnostic[]
310+
): Diagnostic[] {
311+
return walkTreeFlatMapping(node, callback);
312+
}
313+
307314
// ===== Enhanced Validation =====
308315
export function validateScrapScript(
309316
text: string,

0 commit comments

Comments
 (0)