@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
14 lines (13 loc) • 775 B
TypeScript
import type { NormalizerData } from '../../normalizer-data';
import type { RLineDirective } from '../../../../model/nodes/r-line-directive';
import type { RComment } from '../../../../model/nodes/r-comment';
import type { JsonEntry } from '../../../json/format';
/**
* Normalize the given object as an R line directive (`#line <number> "<file>"`).
* This requires you to check the corresponding name beforehand.
* If the given object turns out to be no line directive, this returns a normal comment instead.
*
* @param data - The data used by the parser (see {@link NormalizerData})
* @param obj - The JSON object to extract the meta-information from
*/
export declare function normalizeLineDirective(data: NormalizerData, obj: JsonEntry): RLineDirective | RComment;