@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
35 lines (34 loc) • 1.22 kB
TypeScript
import type { MergeableRecord } from '../../../../util/objects';
import { RawRType } from './type';
import type { SupportedFlowrCapabilityId } from '../../../data/get';
/**
* Just a type-alias so that type declarations become more readable.
*
* @see OperatorDatabase
*/
type StringUsedInRCode = string;
/**
* The arity of an operator.
*/
export declare const enum OperatorArity {
Unary = 1,
Binary = 2,
Both = 3
}
export type OperatorWrittenAs = 'infix' | 'prefix';
export type OperatorUsedAs = 'assignment' | 'operation' | 'access';
export interface OperatorInformationValue extends MergeableRecord {
name: string;
stringUsedInRAst: RawRType | `%${string}%`;
stringUsedInternally: string;
writtenAs: OperatorWrittenAs;
arity: OperatorArity;
usedAs: OperatorUsedAs;
/** The capabilities this operator maps to using the new desugaring */
capabilities: readonly SupportedFlowrCapabilityId[];
}
export declare const OperatorDatabase: Record<StringUsedInRCode, OperatorInformationValue> & MergeableRecord;
export declare const Operators: readonly string[];
export declare const OperatorsInRAst: Set<string>;
export declare const UnaryOperatorsInRAst: Set<string>;
export {};