UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

17 lines (16 loc) 1.11 kB
import type { REnvironmentInformation } from './environment'; import { Ternary } from '../../util/logic'; import type { Identifier, IdentifierDefinition } from './identifier'; import { ReferenceType } from './identifier'; /** * Resolves a given identifier name to a list of its possible definition location using R scoping and resolving rules. * * @param name - The name of the identifier to resolve * @param environment - The current environment used for name resolution * @param target - The target (meta) type of the identifier to resolve * * @returns A list of possible identifier definitions (one if the definition location is exactly and always known), or `undefined` * if the identifier is undefined in the current scope/with the current environment information. */ export declare function resolveByName(name: Identifier, environment: REnvironmentInformation, target?: ReferenceType): IdentifierDefinition[] | undefined; export declare function resolvesToBuiltInConstant(name: Identifier | undefined, environment: REnvironmentInformation, wantedValue: unknown): Ternary;