UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

11 lines (10 loc) 537 B
import type { DeepReadonly } from 'ts-essentials'; import type { RNode } from '../model'; import type { StatefulFoldFunctions } from './stateful-fold'; export type FoldFunctions<Info, Out> = Omit<StatefulFoldFunctions<Info, undefined, Out>, 'down'>; /** * Folds in old functional-fashion over the AST structure. * <p> * Internally implemented as a special case of a two-way fold (with the down part as an essential no-op) */ export declare function foldAst<Info, T>(ast: RNode<Info>, folds: DeepReadonly<FoldFunctions<Info, T>>): T;