import { SpwDocument, SpwDocumentID } from "./spwDocument"; import { RuntimeRegister } from "./register"; import { RawSpwItem } from "../ast/abstract/interfaces/internal"; import { SpwItem, SpwItemKey } from "../ast/abstract/item"; import { SpwItemKind } from "../ast/types/kind"; export declare type Parser = { parse: (input: string) => RawSpwItem; SyntaxError: Error; }; declare type RuntimeRegisters = { all: RuntimeRegister; lastAcknowledged: RuntimeRegister; keys: { [key: string]: RuntimeRegister; }; }; /** * I need to read more about what this is supposed to do. * * Originally I just wanted a place to keep the "meaning" of * */ export declare class Runtime { _rawNodeMap: Map>; private readonly parser; private readonly trees; private readonly documents; /** * Set of modules that are in the ModuleRegistry * @private */ private readonly loadedDocuments; private _registers; /** * * @param parser */ constructor(parser: Parser); get registers(): RuntimeRegisters; /** * Mark a modules as Active * @param key */ loadDocument(key: SpwDocumentID | SpwDocument): SpwItem | SpwItem[] | null; registerDocument(id: SpwDocument): void; locateNode(search: Exclude | RawSpwItem | unknown): SpwItem[]; private hydrateNode; /** * Add a node to the runtime * @param node */ private incorporateNode; /** * * @param src * @private */ private parse; } export {};