/** * DirectiveProcessor.ts * * Processes HoloScript+ @directives at parse-time, extracting: * - Trait bindings (e.g., @grabbable, @audio, @particles) * - Metadata (e.g., @version, @author, @description) * - Control flow hints (e.g., @if, @each, @slot) * - System hooks (e.g., @on, @emit, @networked) * * Works with the TraitBinder to validate that referenced trait handlers exist. */ import { TraitBinder } from './TraitBinder'; export interface ProcessedDirective { name: string; category: 'trait' | 'metadata' | 'control' | 'hook' | 'unknown'; args: Record; valid: boolean; error?: string; } export interface DirectiveProcessorResult { traits: ProcessedDirective[]; metadata: ProcessedDirective[]; controls: ProcessedDirective[]; hooks: ProcessedDirective[]; errors: ProcessedDirective[]; } export declare class DirectiveProcessor { private traitBinder; constructor(traitBinder: TraitBinder); /** * Process an array of raw directives from the parser. */ process(directives: Array<{ name: string; args?: Record; }>): DirectiveProcessorResult; /** * Process a single directive. */ processOne(directive: { name: string; args?: Record; }): ProcessedDirective; /** * Validate all directives, returning errors for invalid ones. */ validate(directives: Array<{ name: string; args?: Record; }>): string[]; } //# sourceMappingURL=DirectiveProcessor.d.ts.map