/** @internal Native KERN body-statement context validator — slice 5b-pre. * * Body-statement nodes (`expression-v1`, `assign`, `return`, `throw`, `do`, `continue`, `break`, `while`, `for`, `with`, * body-form `if`/`else`, body-form `try`) are valid only inside a * `handler lang="kern"` scope (or nested inside another body-statement * under such a handler). Without this rule, the parser silently accepts * orphan `return`/`throw` lines that then crash codegen with confusing * errors deep in the body emitter. * * Rules: * - `assign`, `return`, `throw`, `do`, `continue`, `break`, `while`, `for`, `with` are rejected outside * a native-body scope. * - `continue` and `break` are rejected inside native-body scope unless * nested under `for`/`each`/`while`. * - `if` with a `cond` prop is body-statement form (vs `conditional`'s * `if=` prop); rejected outside native-body scope. * - `else` whose parent is not `conditional` is body-statement form * (sibling of body-`if`); rejected outside native-body scope. * - `try` without a `name` prop and without `step` children is * body-statement form; rejected outside native-body scope. * * Not validated here: * - `let` and `each` have other valid contexts (each-block render path). * - Async-orchestration `try name=…` with `step`/`handler`/`catch`. * * The validator runs as part of `parseInternal`, so both `parseStrict` and * the diagnostics-collecting parse paths surface the error. */ import { type ParseState } from './parser-diagnostics.js'; import type { IRNode } from './types.js'; export declare function validateBodyStatements(state: ParseState, root: IRNode): void;