diff --git a/src/lint/collect-nodes.ts b/src/lint/collect-nodes.ts index 93213869..c9a19f49 100644 --- a/src/lint/collect-nodes.ts +++ b/src/lint/collect-nodes.ts @@ -51,16 +51,22 @@ export function collectNodes( const title = textContentExcludingDeleted(first); headers.push({ element: first, contents: title }); if (title.trim() === 'Static Semantics: Early Errors') { - let grammar = null; + let grammar: Element | null = null; let lists: HTMLUListElement[] = []; + let warned = false; for (const child of node.children) { if (child.nodeName === 'EMU-GRAMMAR') { if (grammar !== null) { if (lists.length === 0) { - // TODO soft errors - throw new Error( - 'unrecognized structure for early errors: grammar without errors' - ); + spec.warn({ + type: 'node', + node: grammar, + ruleId: 'early-error-shape', + message: + 'unrecognized structure for early errors: multiple consecutive s without intervening