/** * Holds a list of identifiers and their documentation at the paths where they are defined or used. * This is analysed during tokenization of RoomleScripts (which itself happens in the format operation). * The identifier document path holder is then used to resolve the autocomplete entries for a component. */ export declare class IdenfitierDocumentPathHolder { tokensAndDocsAtPath: IdentifierDocumentPath[]; getOrCreateIdentifierAtPath: (identifier: string, path: string, isLocalFunction: boolean) => IdentifierDocumentPath; pushDocument: (identifier: string, path: string, document: string) => void; getAllDocuments: (idenfitifer: string) => string[]; } /** * A token that is an identifier in a RoomleScript and the path where it is defined. * Documentation is included if available. */ export declare class IdentifierDocumentPath { /** The identifier itself (variable name, function name) */ identifier: string; /** The path where the identifier is defined or used */ path: string; /** RSDocs documentation strings associated with the identifier */ docs: string[]; usedAtPath: boolean; assignedAtPath: boolean; isFunctionIndentifier: boolean; /** The context of the identifier - local variable, component variable, configuration variable, connection point variable */ context: IdentifierContext; constructor(identifier: string, path: string, docs: string[], context: IdentifierContext); } /** * The context of an identifier - local variable, component variable, configuration variable, connection point variable. * Values of the enum match the prefixes used in RoomleScript. */ export declare enum IdentifierContext { Local = "_", Component = "self", Other = "other", DockPoint = "connection", Configuration = "object" } /** * Resolves the context of an identifier based on its prefix. * If identifier doesn't include the context delimiter (period .), it is assumed to be a component context (self). * Otherwise the first part of the identifier is checked against known prefixes, which is resolved in the same * manner as the Roomle kernel would. * @returns The resolved context of the identifier or the Component (self) context as fallback. */ export declare function resolveIdentifierContext(identifier: string): IdentifierContext; /** * Checks if an identifier is relevant at the given path. * I.e. _. variables are only relevant in the same script, self. variables are relevant everywhere, * @param pathToCheck the path where the identifier would be used * @param context the context of the identifier (local, component, ...) * @param pathOfIdentifier the path where the identifier is defined * @returns true if the identifier is relevant at the given path */ export declare function identifierIsRelevantAtPath(pathToCheck: string, context: IdentifierContext, pathOfIdentifier: string): boolean;