@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
19 lines (18 loc) • 1.03 kB
TypeScript
import { type REnvironmentInformation } from './environment';
/**
* Add a new local environment scope to the stack, returns the modified variant (shares the original stack, no deep-clone).
* @see {@link popLocalEnvironment} - to remove the local scope again
*/
export declare function pushLocalEnvironment({ level, current }: REnvironmentInformation): REnvironmentInformation;
/**
* Remove the top local environment scope from the stack, returns the modified variant (shares the original stack, no deep-clone).
* @see {@link pushLocalEnvironment} - to add a local scope
*/
export declare function popLocalEnvironment({ current, level }: REnvironmentInformation): REnvironmentInformation;
/**
* Pads whichever of `base`/`next` is shallower with empty local scopes until both are at the same lexical {@link REnvironmentInformation#level|level}.
*/
export declare function padToCommonScope(base: REnvironmentInformation, next: REnvironmentInformation): {
base: REnvironmentInformation;
next: REnvironmentInformation;
};