@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
20 lines (19 loc) • 908 B
TypeScript
import type { NormalizerData } from '../../normalizer-data';
import type { RDelimiter } from '../../../../model/nodes/info/r-delimiter';
import type { RNode } from '../../../../model/model';
import type { JsonEntry, NamedJsonEntry } from '../../../json/format';
/**
* Split a token collection into comments tokens and "other" tokens
*/
export declare function splitComments(tokens: readonly NamedJsonEntry[]): {
comments: NamedJsonEntry[];
others: NamedJsonEntry[];
};
/**
* Normalizes a list of expressions, handling semicolons and braces
*/
export declare function normalizeExpressions(data: NormalizerData, tokens: readonly JsonEntry[] | readonly NamedJsonEntry[]): (RNode | RDelimiter)[];
/**
* Parses nodes when their type is unknown
*/
export declare function parseNodesWithUnknownType(data: NormalizerData, mappedWithName: readonly NamedJsonEntry[] | undefined): (RNode | RDelimiter)[];