feat(language-server): flag the removed data blocks
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -685,7 +685,7 @@ export function parse(source: string): PageAst {
|
||||
}
|
||||
if (lx.peek().type === "lbrace") {
|
||||
throw new ParseError(
|
||||
`"${rawMode} { … }" data blocks were removed. Declare API calls in a page-level "apis { }" block, and move mode-scoped helpers into "functions { shared function … }".`,
|
||||
`"${rawMode} { … }" data blocks were removed. Declare API calls in a page-level "apis { }" block, and move mode-scoped helpers into "functions { shared function … }" (at offset ${kw.pos}).`,
|
||||
);
|
||||
}
|
||||
throw new ParseError(`Expected a ${rawMode} state block or hydrate assignment`);
|
||||
|
||||
Reference in New Issue
Block a user