/** * The Web parser's composition root. `parser.ts` was one 1,050-line module; * D115 P4 R3e split the syntax families into `parser/` and left the class that * the Web extension registers here — its one field, the eight `protected` seams, * and the host every collaborator reaches back through. * * Where to look: * * - `parser/spans.ts` span shifting, the three diagnostic constructors * - `parser/look-source.ts` a `look:` block's own indented source * - `parser/keyframes-source.ts` a `keyframes:` block's own indented source * - `parser/statements/heads.ts` whether a contextual word is a declaration head * - `parser/statements/components.ts` props, lifecycle names, the component item loop * - `parser/statements/reactive.ts` state, computed, resource, action, watch * - `parser/statements/imports.ts` `import css unsafe` * - `parser/statements/unsafe-css.ts` the inline `unsafe css` block and its placement * - `parser/expressions/jsx.ts` the JSX token and its interpolations * - `parser/expressions/look.ts` `look:` as a value * - `parser/expressions/keyframes.ts` `keyframes:` as a value * - `parser/expressions/visual-block.ts` consuming the block those two are written in * * A collaborator never names `VelarWebParser`: it declares the interface it * needs, and that interface is the record of what it depends on. The host's * properties are live reads of the parser, because the token cursor moves under * a collaborator while it runs. */ import { type Span } from "@velarscript/compiler"; import { Parser, type CompilerLexicalExtension, type Expression, type Parameter, type Statement, type Token, type TypeSyntax } from "@velarscript/compiler/extension"; export declare class VelarWebParser extends Parser { private insideComponentProps; private readonly host; /** * The one object every collaborator is handed. Its properties are live reads * of the parser: the cursor moves under a collaborator, so `current()`, the * diagnostics array and `insideComponentProps` must be the parser's own and * not a snapshot taken when the host was built. `insideComponentProps` is * `private` here, so it arrives as an accessor pair — the component body loop * raises it, the prop list reads it back. */ private webParserHost; constructor(tokens: readonly Token[], lexicalExtensions: readonly CompilerLexicalExtension[]); /** * WEB-N4: a component prop list is where a Web author reaches for the HTML * names, and Core's own list is what every other parameter list is read with. */ protected parseParameters(): readonly Parameter[]; protected createNestedParser(tokens: readonly Token[]): Parser; protected validateExtensionTypeArguments(name: string, arguments_: readonly TypeSyntax[], nameSpan: Span): boolean; protected parseExtensionNumericLiteral(token: Token, value: number, unit: string): Expression; protected parseExtensionStatement(start: number, modifiers: { readonly exported: boolean; readonly abstract: boolean; readonly asynchronous: boolean; }): Statement | null | undefined; protected parseUnsafeExtensionStatement(start: number): Statement | null | undefined; protected parseExtensionImport(start: number): Statement | null | undefined; protected parseExtensionExpression(token: Token): Expression | undefined; } //# sourceMappingURL=parser.d.ts.map