/** * Signature Parser * * Parses annotated rill closure type signature strings at registration time. * This module bridges the lexer/parser boundary so that runtime/core/context.ts * can parse signatures without importing from parser/* or lexer/* directly. * * Import boundary note: * - This file lives at src/ level (not in runtime/), so it may import from * both lexer and parser barrels. * - runtime/core/context.ts imports from this file (../../signature-parser.js), * which is NOT in parser/* or lexer/* — boundary preserved. */ import type { RillParam } from './runtime/core/callable.js'; import type { TypeStructure } from './runtime/core/types/structures.js'; /** * Result of parsing a signature string at registration time. */ interface ParsedSignature { readonly params: RillParam[]; readonly returnType: TypeStructure | undefined; readonly description: string | undefined; } /** * Parse a rill closure type signature string into structured parameter declarations. * * Signature format (optional closure-level annotation before param list): * ``` * ^(description: "...") |^(description: "...") x: string = "default", y: number|:string * ``` * The return type follows `:type` directly after the closing `|`. * * Throws Error with message `Invalid signature for function '{name}': {parse error}` * on any parse failure. * * @param signature - The signature string to parse * @param functionName - The function name (for error messages) * @returns Parsed params, return type, and description * * @internal */ export declare function parseSignatureRegistration(signature: string, functionName: string): ParsedSignature; export {};