/****************************************************************************** * Copyright 2024 - 2025 TypeFox GmbH * This program and the accompanying materials are made available under the * terms of the MIT License, which is available in the project root. ******************************************************************************/ import { type AstNode } from 'langium'; import type { LangiumServicesLike } from '../types.js'; interface MappingRule { /** * Determines which nodes to map with this rule */ predicate: (node: AstNode) => boolean; /** * Determines how to map the node's textual split */ map: (node: AstNode) => string; } interface ProgramMapOptions { /** * List of mapping rules to apply to the document. * Each rule is a predicate that determines which nodes to map & how to map them */ mappingRules: MappingRule[]; } /** * Mapper generates a repo-map like structure from a given Langium document. * Leverages the splitter to produce a mapping from split chunks. */ export declare class ProgramMapper { private services; private options; constructor(services: LangiumServicesLike, options: ProgramMapOptions); /** * Produces a map from the given document * @param document - The text document to be mapped. * @returns The mapped document as a list of strings, one for each mapped element */ map(document: string): string[]; } export {}; //# sourceMappingURL=program-map.d.ts.map