import { BindingType } from './template-result'; /** * Represents a template binding. * @interface TemplateBinding */ export interface TemplateBinding { /** The type of the binding */ type: BindingType; /** The name of the binding (optional) */ name?: string; /** The index of the binding */ index: number; /** Event modifiers (optional) */ modifiers?: string[]; /** For multi-part attribute bindings: static string segments (N+1 entries for N values) */ strings?: string[]; /** For multi-part attribute bindings: which part this is (0-based) */ partIndex?: number; /** For multi-part attribute bindings: index of the first binding in the group */ groupStart?: number; /** Human-readable debug context for developer-facing errors */ debugLabel?: string; } /** * Represents the result of parsing a template string. * @interface ParsedTemplate */ export interface ParsedTemplate { /** The HTML string with binding markers */ html: string; /** Array of template bindings found in the HTML */ bindings: TemplateBinding[]; } /** * Parser for HTML templates with binding markers. * Uses a state machine to correctly handle expressions in any context: * text content, single-expression attributes, and multi-expression attributes. */ export declare class TemplateParser { private static BINDING_MARKER; private static ATTRIBUTE_PREFIX_REGEX; /** * Performance tracking */ private metrics; /** * Get performance metrics */ getPerformanceMetrics(): { parseTime: number; parseCount: number; cacheHits: number; cacheMisses: number; }; /** * Reset performance metrics */ resetMetrics(): void; /** * Parses template strings and extracts bindings. * Handles text/node bindings, single-expression attribute bindings, * and multi-expression attribute bindings (e.g. style="color: ${a}; bg: ${b}"). */ parse(strings: TemplateStringsArray): ParsedTemplate; private getEventBindingName; private parseEventModifiers; /** * After an attribute value closes, determine the final binding type(s) for the group. * Single-expression attributes with special prefixes/names use specialized types. * Multi-expression or plain attributes use BindingType.Attribute. */ private finalizeAttrGroup; /** * Determine the specialized binding type for a single-expression attribute. */ private getSpecializedType; private buildBindingDebugLabel; } //# sourceMappingURL=parser.d.ts.map