/** * `component Name(props) exposes Handle:` — its prop list, its lifecycle hook * names, and the item loop that reads its body. * * The prop list is the only place `insideComponentProps` is read, and the body * loop is the only writer of it, so the depth counter is the one piece of * parser state this face declares. */ import { type Diagnostic } from "@velarscript/compiler"; import { type Parameter, type Statement, type Token, type TokenKind } from "@velarscript/compiler/extension"; import { type WebComponentDeclaration as ComponentDeclaration } from "../../ast.ts"; import { type StatementHeadParserHost } from "./heads.ts"; import { type ReactiveParserHost } from "./reactive.ts"; export interface ComponentParserHost extends StatementHeadParserHost, ReactiveParserHost { advance(): Token; check(kind: TokenKind): boolean; consumeNewlines(): void; current(): Token; readonly diagnostics: Diagnostic[]; expectStatementBoundary(): void; insideComponentProps: number; matchExtensionKeyword(value: string): boolean; parseStatement(): Statement | null; parseTypeParameters(): unknown; peekValue(distance: number): string; skipMistypedDeclaration(): void; } /** * WEB-N4: a component prop list is where a Web author reaches for the HTML * names, and `class`, `look`, and the Core keywords are all tokens rather than * identifiers. Recovering the keyword as the prop name turns an eleven-message * parser cascade into one directed message, and a declaration-position `?` * teaches the default value that actually makes a prop omittable. */ export declare function parseComponentProps(host: ComponentParserHost): readonly Parameter[]; export declare function parseComponent(host: ComponentParserHost, start: number, exported: boolean): ComponentDeclaration; //# sourceMappingURL=components.d.ts.map