UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

44 lines (43 loc) 3.5 kB
import type { Leaf, Location, NoInfo } from '../model'; import { RNode } from '../model'; import type { RStringValue } from '../../../convert-values'; import { RType } from '../type'; import { SemVer } from 'semver'; /** * Represents a string like `"hello"`, including raw strings like `r"(hello)"`. * @see {@link isRString} - to check whether a node is an R string */ export interface RString<Info = NoInfo> extends Leaf<Info>, Location { readonly type: RType.String; content: RStringValue; } /** * Helper for working with {@link RString} AST nodes. */ export declare const RString: { name: string; /** * Type guard for RString nodes. * @see {@link RString} */ is<Info = object>(this: void, node: RNode<Info> | undefined): node is RString<Info>; /** * Returns the minimum R version that supports raw strings (in a stable format). * @see {@link RString} */ rawStringAvailableFromRVersion(): SemVer; getLocation: (this: void, node: RNode) => import("../../../../../util/range").SourceLocation | undefined; getId: (this: void, node: RNode<import("../processing/decorate").ParentInformation>) => import("../processing/node-id").NodeId; getType: (this: void, node: RNode) => RType; visitAst: <OtherInfo = object>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo>>, onVisit?: import("../processing/visitor").OnEnter<OtherInfo>, onExit?: import("../processing/visitor").OnExit<OtherInfo>) => void; collectAllIds: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Set<import("../processing/node-id").NodeId>; directChildren: <OtherInfo>(this: void, node: RNode<OtherInfo>) => readonly (RNode<OtherInfo> | typeof import("./r-function-call").EmptyArgument)[]; directParent: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined; iterateParents: <OtherInfo>(this: void, node: RNode<OtherInfo & import("../processing/decorate").ParentInformation> | undefined, idMap: Map<import("../processing/node-id").NodeId, RNode<OtherInfo & import("../processing/decorate").ParentInformation>>) => Generator<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>; depth: (this: void, node: RNode<import("../processing/decorate").ParentInformation>, idMap: Map<import("../processing/node-id").NodeId, RNode<import("../processing/decorate").ParentInformation>>) => number; collectAllIdsWithStop: <OtherInfo>(this: void, nodes: import("../../../../../abstract-interpretation/normalized-ast-fold").SingleOrArrayOrNothing<RNode<OtherInfo & import("../processing/decorate").ParentInformation>>, stop: (node: RNode<OtherInfo & import("../processing/decorate").ParentInformation>) => boolean) => Set<import("../processing/node-id").NodeId>; lexeme: <R extends RNode<import("../processing/decorate").ParentInformation>>(this: void, node: R | undefined) => R extends { lexeme: string; } ? string : string | undefined; documentation: typeof import("../../../../roxygen2/documentation-provider").getDocumentationOf; };