import { type Diagnostic, type Span } from "@velarscript/compiler"; import { Analyzer, type AnalysisContext, type CompilerAnalysisExtension, type Expression, type Program, type Statement, type TypeReference, type ValueType } from "@velarscript/compiler/extension"; import { inferWebIntrinsic } from "./analysis/calls/intrinsics.ts"; import { routeContextIdentity } from "./analysis/web-types.ts"; export { inferWebIntrinsic, routeContextIdentity }; export declare class VelarWebAnalyzer extends Analyzer { private componentStates; private mountedDepth; private cleanupDepth; /** D51 (audit 12): a component `watch` body runs on a change and ends, exactly as a module `watch` body does. */ private watchBodyDepth; /** D89 A4: the binding identity of every list a keyed `.map(...)` interpolation renders. */ private readonly keyedListSources; /** D89 A4: every row rebuild of this module — assigned or derived — in source order. */ private readonly keyedListRebuilds; /** D89 A4: this module's `def` bodies by name, so a `computed` that calls one can be read through. */ private moduleFunctions; private synchronousReactiveDepth; private jsxDepth; /** VEL5075: how many component bodies enclose the declaration being analyzed. */ private componentBodyDepth; private readonly resources; private readonly unsafeCssImports; private readonly probedOperandTypes; private readonly importedLookStaticValues; private lookStatic; private readonly lookEntryScopes; private readonly derivedReactiveNames; private readonly checkedBuilderCalls; private readonly staticJsxKeys; private readonly honoredJsxKeys; private readonly reportedJsxKeys; private lookBuilderNames; /** * D103: the module's `velar/look` import, so the migration off * `color("var(--x)")` can write the `token` import it needs in the same * rewrite. A migration that only changed the call would leave the module * naming a builder it never imported, which is not a mechanical fix. */ private lookImport; private lookDeclarations; private lookLiteralDepth; /** * D71 rule 182: the declaration spans of every `computed` binding in scope. * A binding's span survives narrowing, so it identifies the declaration a * name resolves to even where a narrowed copy answers the lookup. */ private readonly computedBindingSpans; /** * D114 W: the declaration spans of every `resource` in scope, kept the way * `computedBindingSpans` keeps derived values — the question is asked of the * binding a name resolves to, so a local shadow of a resource's name is not * one. */ private readonly resourceBindingSpans; /** D114 W A2(b): this module's `action` and `async def` bodies by name. */ private reactiveWriters; /** D114 P6 item 6 (ST-U2): each same-module `computed` and the names it reads on every evaluation. */ private reactiveDerivations; /** Each `state` this module declares, false where the name is declared twice. */ private reactiveStateNames; /** Local names bound to an imported `export computed`, from the Web interface. */ private readonly importedComputedNames; /** The resolved spans of those imports, so a local shadow of the name is not one. */ private readonly importedComputedSpans; /** D71 migration state: `const x = computed(...)` sites, their reads, and every other reference to the name. */ private readonly retiredAccessorDeclarations; private readonly retiredAccessorReads; private readonly retiredComputedReferences; private readonly migratedComputedCallees; /** Callee span identity -> call span, for every zero-argument call of a plain name. */ private readonly plainCallSpans; /** D57 rule 138: `velar/web-test` is legal only where the browser runner looks. */ private readonly webModulePath; /** The source coordinates used by mechanical JSX attribute rewrites. */ private readonly webSourceText; /** D74: only props whose authors wrote a readonly contract receive prop-specific guidance. */ private explicitReadonlyPropBindings; /** D114 0.29.0 LC-D1: the manifest's `web.publicConfig`, or null when this compile read no project manifest — an empty section is a claim the compile may check, and no manifest is no claim at all. */ private readonly webPublicConfig; private publicConfigNames; /** velar/look builder calls this compile refused on their own arguments (D114 0.29.0 LK-I2). */ private readonly refusedBuilderCalls; /** The one object every `analysis/` collaborator reads this analyzer through. */ private readonly host; constructor(context?: AnalysisContext, extensions?: readonly CompilerAnalysisExtension[]); analyze(program: Program): readonly Diagnostic[]; protected predeclareExtensionStatement(statement: Statement): boolean; protected analyzeExtensionStatement(statement: Statement): boolean; protected analyzeStatement(statement: Statement): void; protected prescanExtensionScopeDeclaration(statement: Statement): { readonly name: string; readonly span: Span; } | null; protected markDeclaredBindingReactive(name: string, kind?: "state" | "prop"): void; protected inferExtensionExpression(expression: Expression, _contextualType: ValueType): ValueType | undefined; protected inferExpression(expression: Expression, contextualType?: ValueType): ValueType; protected extensionFieldsOf(name: string): ReadonlyMap | null; protected inferExtensionCall(callee: import("@velarscript/compiler/extension").ExtensionValueType, arguments_: readonly Expression[], argumentNames: readonly (string | null)[] | undefined, callSpan: Span): ValueType | undefined; protected validateExtensionTypeSyntax(syntax: import("@velarscript/compiler/extension").TypeSyntax, validate: (syntax: import("@velarscript/compiler/extension").TypeSyntax) => boolean, resolve: (reference: TypeReference) => ValueType): boolean | undefined; protected ownershipScopeRejection(): string | null; protected extensionOwnsFunctionlessReturn(): boolean; protected invalidExtensionAwaitContext(): boolean; protected invalidExtensionAwaitMessage(): string | null; protected resolveAnnotation(reference: TypeReference | null): ValueType; /** * The one host the `analysis/` collaborators read this analyzer through, * built here because a `private` member cannot be read outside the class it is * declared in (TS2341, D114 line 512). Every table the walk replaces once per * program and every depth a collaborator moves arrives as an accessor pair, so * a collaborator reads the live value and keeps its own `host.jsxDepth += 1` * text. */ private analysisHost; /** * The base-analyzer operations the collaborators perform, bound to this * analyzer. They are their own object because they are plain function values: * spreading them into the host above copies the bindings, while an accessor * has to be written in the literal that becomes the host. */ private analyzerOperations; } //# sourceMappingURL=analyzer.d.ts.map