UNPKG

@syntest/analysis

Version:
55 lines 2.35 kB
import { ControlFlowProgram } from "@syntest/cfg"; import { AbstractSyntaxTreeFactory } from "./factories/AbstractSyntaxTreeFactory"; import { ControlFlowGraphFactory } from "./factories/ControlFlowGraphFactory"; import { DependencyFactory } from "./factories/DependencyFactory"; import { SourceFactory } from "./factories/SourceFactory"; import { TargetFactory } from "./factories/TargetFactory"; import { SubTarget, Target } from "./Target"; export declare class RootContext<S> { protected _rootPath: string; protected sourceFactory: SourceFactory; protected abstractSyntaxTreeFactory: AbstractSyntaxTreeFactory<S>; protected controlFlowGraphFactory: ControlFlowGraphFactory<S>; protected targetFactory: TargetFactory<S>; protected dependencyFactory: DependencyFactory<S>; protected _sources: Map<string, string>; protected _abstractSyntaxTrees: Map<string, S>; protected _controlFlowProgramMap: Map<string, ControlFlowProgram>; protected _targetMap: Map<string, Target>; protected _dependenciesMap: Map<string, string[]>; constructor(rootPath: string, sourceFactory: SourceFactory, abstractSyntaxTreeFactory: AbstractSyntaxTreeFactory<S>, controlFlowGraphFactory: ControlFlowGraphFactory<S>, targetFactory: TargetFactory<S>, dependencyFactory: DependencyFactory<S>); protected resolvePath(filePath: string): string; protected verifyTargetPath(filePath: string): boolean; /** * Loads the source code of the target * @param filePath */ getSource(filePath: string): string; /** * Loads the abstract syntax tree from the given filePath * @param filePath */ getAbstractSyntaxTree(filePath: string): S; /** * Loads the control flow program from the given filePath * @param filePath */ getControlFlowProgram(filePath: string): ControlFlowProgram; /** * Loads the target context from the given filePath * @param _filePath * @returns */ getTarget(filePath: string): Target; /** * gets all sub-targets from the given filePath * @param filePath */ getSubTargets(filePath: string): SubTarget[]; /** * Loads all dependencies from the given filePath * @param filePath */ getDependencies(filePath: string): string[]; } //# sourceMappingURL=RootContext.d.ts.map