langium-cli
Version:
CLI for Langium - the language engineering tool
21 lines • 1.43 kB
TypeScript
/******************************************************************************
* Copyright 2021 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 Grammar, type LangiumCoreServices } from 'langium';
import type { LangiumConfig, LangiumLanguageConfig } from '../package-types.js';
export declare function generateAstSingleLanguageProject(services: LangiumCoreServices, embeddedGrammar: Grammar, config: LangiumConfig): string;
export declare function generateAstMultiLanguageProject(services: LangiumCoreServices, languages: LanguageInfo[], config: LangiumConfig): string;
export interface LanguageInfo {
/** the grammar which is defined as entry/main grammar */
entryGrammar: Grammar;
/** copy of the entry grammar, all imports are (recursively) replaced by the content of the imported grammar(s) */
embeddedGrammar: Grammar;
/** the whole configuration for this language, by default done in a langium-config.json file */
languageConfig: LangiumLanguageConfig;
/** used to identify/name this language in the generated ast.ts */
identifier: string;
}
export declare function getLanguageIdentifier(_config: LangiumConfig, grammar: Grammar): string;
//# sourceMappingURL=ast-generator.d.ts.map