UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

20 lines (19 loc) 1.03 kB
import type { ParentInformation, RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate'; import type { KnownParser } from '../../r-bridge/parser'; import type { GeneralDocContext } from '../wiki-mk/doc-context'; import type { RProject } from '../../r-bridge/lang-4.x/ast/model/nodes/r-project'; /** * Visualizes the normalized AST using mermaid syntax. * This is mainly intended for documentation purposes. */ export declare function printNormalizedAst(ast: RProject<ParentInformation> | RNodeWithParent, prefix?: string): string; export interface PrintNormalizedAstOptions { readonly showCode?: boolean; readonly prefix?: string; readonly ctx?: GeneralDocContext; } /** * Generates and prints the normalized AST for the given code, along with optional metadata and the original code. * This is intended for documentation purposes. */ export declare function printNormalizedAstForCode(parser: KnownParser, code: string, { showCode, prefix, ctx }?: PrintNormalizedAstOptions): Promise<string>;