UNPKG

stryker

Version:
33 lines 1.16 kB
import * as estree from 'estree'; import { Identified, IdentifiedNode } from '../mutators/IdentifiedNode'; /** * Parses code to generate an Abstract Syntax Tree. * @function * @param code - The code which has to be parsed. * @returns {Object} The generated Abstract Syntax Tree. */ export declare function parse(code: string): estree.Program; /** * Parses a Node to generate code. * @param The Node which has to be transformed into code. * @returns The generated code. */ export declare function generate(node: estree.Node): string; /** * Returns n as T & Identified, purely syntactic. * @param n The estree node which is identified */ export declare function identified<T extends estree.Node>(n: T): T & Identified; /** * Represents an object responsible to identify estree nodes (estree.Node). * Labels all nodes with a `nodeID` recursively. */ export declare class NodeIdentifier { private identifiedNodes; identifyAndFreeze(program: estree.Program): Readonly<IdentifiedNode>[]; private identifyAndFreezeRecursively; private isNode; private isIdentified; private identify; } //# sourceMappingURL=parserUtils.d.ts.map