/** * Whether a contextual Web word standing at the start of a line is a * declaration head at all, and the token shapes each head is claimed by. * * D30 item 16 is one rule with three readings — a name and a shape token, a * header line ending in ':', a word followed by a fresh value — and both the * module-level dispatcher in `parser.ts` and `parseComponent` ask all three, so * the lookaheads are a shared module rather than a copy on each side. */ import type { TokenKind } from "@velarscript/compiler/extension"; export interface StatementHeadParserHost { checkWord(value: string): boolean; peekKind(distance: number): TokenKind; } export declare const componentHeaderShapes: Set; export declare const reactiveBindingShapes: Set; export declare const actionHeaderShapes: Set; /** * D30 item 16: a Web declaration head is claimed only in its own declaration * shape — the word, a name, and one of the tokens that can follow it there. * `state = 1`, `state(x)`, and `state.field` all keep the identifier reading. */ export declare function namedDeclarationAhead(host: StatementHeadParserHost, word: string, shapes: ReadonlySet): boolean; /** * `watch` opens a block: its header line ends in ':' and an indented body * follows. No expression statement can end in ':', so the lookahead is exact * and `watch = 1` / `watch(value)` stay ordinary code. */ export declare function blockHeaderAhead(host: StatementHeadParserHost, word: string): boolean; /** * `expose value` is the one Web statement head followed by a bare expression * rather than by a name and a shape token. It is claimed only when the next * token opens a fresh value, so `expose(handle)` reads as a call and * `expose = handle` as an assignment — the identifier reading wins wherever * the two could compete. */ export declare function exposeItemAhead(host: StatementHeadParserHost): boolean; //# sourceMappingURL=heads.d.ts.map