UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

33 lines (32 loc) 1.16 kB
import type { Range } from 'semver'; export interface RLicenseInfo { type: 'license'; license: string; versionConstraint?: Range; } export interface RLicenseExceptionInfo { type: 'exception'; exception: string; } export interface RLicenseCombinationInfo { type: 'combination'; combination: 'and' | 'or' | 'with'; elements: [left: RLicenseElementInfo, right: RLicenseElementInfo]; } export interface NoLicenseInfo { type: 'no-license'; } /** * The structured representation of an R license element. * This can be a license, an exception, a combination of licenses, or no license. * @see {@link parseRLicense} and {@link stringifyRLicense} to parse and stringify R license strings. */ export type RLicenseElementInfo = RLicenseInfo | RLicenseExceptionInfo | RLicenseCombinationInfo | NoLicenseInfo; /** * Parses an R license string into its structured representation. */ export declare function parseRLicense(licenseString: string): RLicenseElementInfo; /** * Stringifies an R license element back into its string representation. */ export declare function stringifyRLicense(license: RLicenseElementInfo): string;