import type { Expression, FullObject, InterpreterContext } from "@hylimo/core"; import { type FunctionDocumentation, type LabeledValue, type ParseableExpressions } from "@hylimo/core"; import { ContentModule } from "../../contentModule.js"; /** * * Represents a parsed classifier entry with its values and compartment index. */ export interface ParsedClassifierEntry { /** * The labeled values associated with this classifier entry */ values: LabeledValue[]; /** * The compartment index of this entry within the classifier */ index: number; } /** * * Specification for creating a classifier scope with type-specific context and parsing logic. * * @template T The type of the context extracted for parsing entries */ export interface ClassifierScopeSpecification { /** * The name of the classifier scope function */ name: string; /** * Documentation for the function */ docs: FunctionDocumentation; /** * Edit configurations with value and name pairs */ edits: { value: string; name: string; }[]; /** * Function to extract context used for parsing the entries */ extractContext: (context: InterpreterContext, args: FullObject) => T; /** * Function to parse expressions into classifier entries */ parseEntries: (parseContext: T, expressions: Expression[], context: InterpreterContext) => ParsedClassifierEntry[]; } /** * Creates a content module for classifier scopes with the given specifications. * This function sets up the necessary scope functions and edits. * * @template T The type of context used by the classifier specifications * @param name The name of the content module * @param contentHandlerName The name of the content handler to be assigned * @param specifications Array of classifier scope specifications defining the behavior * @param additionalExpressions Additional parseable expressions to include in the module * @returns A configured ContentModule for classifier scopes */ export declare function createClassifierScopeContentModule(name: string, contentHandlerName: string, specifications: ClassifierScopeSpecification[], additionalExpressions: Exclude): ContentModule; //# sourceMappingURL=classifierScope.d.ts.map