import { ComponentPath } from '../classes/componentpath'; import { ComponentPayload } from '../classes/componentpayload'; import { Token } from '../facades/roomlescript-antlr-facade'; import { ComponentAutocompleteEntry } from '../classes/componentautocompleteentry'; import { IdenfitierDocumentPathHolder, IdentifierDocumentPath } from '../classes/identifieranddocumentsatpath'; /** * @deprecated unused */ export declare enum AutocompleteEntryKind { na = 0, Keyword = 1, Parameter = 2, Value = 3, InternalVariable = 4, SubComponentInternalId = 5, SetObjSurfaceMaterialParameter = 6, Superseding = 7 } /** * After running a format operation, where the RoomleScripts are tokenized and analyzed, this function performs static analysis of the JSON structure * to extract all possible identifiers that can be used in RoomleScript of this component. It will resolve the RoomleScript identifiers as well as * parameters, subcomponents and their supersedings, functions etc. and will return an array of autocomplete entries that can be used in an editor. * CHANGE after 5.6.x: The payload's autocompleteEntries is not filled anymore, instead the entries are returned. * @param payload the component payload to extract the autocomplete entries from * @param preferredAutocompleteLanguage * @param path If path is provided, the RoomleScript identifiers will be filtered to those that are relevant at the given path. * @param resolveForSubComponentInternalId If set, this will return the relevant entries that are accessible from the subComponent with the given internalId. If unset, we presume that the autocomplete entries are provided for the current component. * @returns The resolved array of autocomplete entries. */ export declare function resolveAutocompleteEntries(payload: ComponentPayload, preferredAutocompleteLanguage: string | undefined, path: ComponentPath | undefined, resolveForSubComponentInternalId?: string | undefined): ComponentAutocompleteEntry[]; /** * Searches for an existing autocomplete entry by its identifier and returns it. If not found, creates a new one, adds it to the entries array and returns it. * @param entries the array of existing entries * @param searchInsertText the identifier to search for * @returns */ export declare function getAutocompleteEntry(entries: ComponentAutocompleteEntry[], searchInsertText: string): ComponentAutocompleteEntry; /** * Analyses three consecutive tokens and uses this to fill the autocomplete entries with identifiers and documentation. * @param autocompleteCache IdentifierDocumentPathHolder to push the results into * @param currentToken * @param nextToken * @param afterNextToken * @param path */ export declare function resolveRoomleScriptToken(autocompleteCache: IdenfitierDocumentPathHolder | undefined, currentToken: Token, nextToken: Token, afterNextToken: Token | undefined, path: string): void; /** * Extracts from the identifier document path holder only those entries that are relevant at the given script path. * @param path * @param holder * @returns */ export declare function filterIdentifierPathHoldersByScriptPath(path: string, holder: IdenfitierDocumentPathHolder): IdentifierDocumentPath[];