UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

23 lines (22 loc) 1.35 kB
import { type IdGenerator, type NormalizedAst } from '../../model/processing/decorate'; import type { NoInfo } from '../../model/model'; import type { ParseStepOutput, ParseStepOutputSingleFile } from '../../../../parser'; import { FlowrConfig } from '../../../../../config'; import type { Tree } from 'web-tree-sitter'; import { RProject } from '../../model/nodes/r-project'; export declare const parseLog: import("tslog").Logger<import("tslog").ILogObj>; /** * Take the output as produced by the parse step and normalize the AST from the R parser. * @see {@link normalizeButNotDecorated} - for a version that does not decorate the AST * @see {@link normalizeTreeSitter} - for a version that normalizes the AST from the TreeSitter parser */ export declare function normalize(parsed: ParseStepOutput<string>, getId?: IdGenerator<NoInfo>): NormalizedAst; /** * Take the output as produced by the parse step and normalize the AST from the R parser. * For additional decoration with {@link decorateAst} use {@link normalize}. */ export declare function normalizeButNotDecorated({ parsed, filePath }: ParseStepOutputSingleFile<string>): RProject; /** * Tree-Sitter pendant to {@link normalize}. */ export declare function normalizeTreeSitter(parsed: ParseStepOutput<Tree>, getId?: IdGenerator<NoInfo>, config?: FlowrConfig): NormalizedAst;