/** * Reading a domain value at a role slot: the value reading framework's first * matcher did, moved here for the stock reader on the matcher's skeleton * (`stock-reader.ts`, domains rethink Phase 4.7). The first matcher was * deleted in 5.0 (Phase 6). * * In order: an English noise word before a selector (`the`), then the * multi-token forms (a possessive, `my value`; a method call, * `#dialog.showModal()`; a possessive selector, `#el's *opacity`; a property * access, `user.name`; a selector and its property, `#out.innerText`), then one * token by its kind (a selector, a quoted string, a number, a boolean, a * duration, a URL, an identifier). Each is checked against the slot's * expected types. */ import type { PatternToken, SemanticRole, SemanticValue, TokenStream } from '../types'; /** What value reading needs of a language profile: its code, and its possessive words. */ export interface ReadingProfile { readonly code: string; readonly possessive?: { readonly keywords?: Record; }; } /** * Safely convert a value to lowercase string. * Provides protection against non-string values at runtime. */ /** `value` lower-cased, whatever it is (the old matcher's keyword compare uses it too). */ export declare function safeToLowerCase(value: unknown): string; /** * Match a role pattern token (captures a semantic value). * Handles multi-token expressions like: * - 'my value' (possessive keyword + property) * - '#dialog.showModal()' (method call) * - "#element's *opacity" (possessive selector + property) */ /** * Read a value for `patternToken`'s role at the stream's position into * `captured`, and advance past it. False when the slot does not match; an * optional slot whose value does not fit returns true and captures nothing. */ export declare function readRoleValue(tokens: TokenStream, patternToken: PatternToken & { type: 'role'; }, captured: Map, profile?: ReadingProfile): boolean; //# sourceMappingURL=stock-reading.d.ts.map