import type { Range, Diagnostic, CodeAction, Position, CompletionItem, Location, DocumentSymbol, WorkspaceSymbol, Disposable, FileChangeType, SelectionRange } from 'vscode-languageserver-protocol'; import type { Scope } from './Scope'; import type { BrsFile } from './files/BrsFile'; import type { XmlFile } from './files/XmlFile'; import type { FunctionScope } from './FunctionScope'; import type { FunctionType } from './types/FunctionType'; import type { ParseMode } from './parser/Parser'; import type { Program, SourceObj, TranspileObj } from './Program'; import type { ProgramBuilder } from './ProgramBuilder'; import type { FunctionStatement } from './parser/Statement'; import type { Expression } from './parser/AstNode'; import type { TranspileState } from './parser/TranspileState'; import type { SourceMapGenerator, SourceNode } from 'source-map'; import type { BscType } from './types/BscType'; import type { AstEditor } from './astUtils/AstEditor'; import type { Token } from './lexer/Token'; import type { SemanticTokenModifiers, SemanticTokenTypes } from 'vscode-languageserver'; import type { SourceFixAllCodeAction } from './CodeActionUtil'; export interface BsDiagnostic extends Diagnostic { file: BscFile; /** * A generic data container where additional details of the diagnostic can be stored. These are stripped out before being sent to a languageclient, and not printed to the console. */ data?: any; } export declare type BscFile = BrsFile | XmlFile; export interface Callable { file: BscFile; name: string; /** * Is the callable declared as "sub". If falsey, assumed declared as "function" */ isSub: boolean; type: FunctionType; /** * A short description of the callable. Should be a short sentence. */ shortDescription?: string; /** * A more lengthy explanation of the callable. This is parsed as markdown */ documentation?: string; params: CallableParam[]; /** * The full range of the function or sub. */ range: Range; /** * The range of the name of this callable */ nameRange?: Range; isDeprecated?: boolean; getName: (parseMode: ParseMode) => string; /** * Indicates whether or not this callable has an associated namespace */ hasNamespace: boolean; /** * Gives access to the whole statement if you need more data than provided by the interface */ functionStatement: FunctionStatement; } export interface FunctionCall { /** * The full range of this function call (from the start of the function name to its closing paren) */ range: Range; functionScope: FunctionScope; file: File; name: string; args: CallableArg[]; nameRange: Range; } /** * An argument for an expression call. */ export interface CallableArg { text: string; type: BscType; typeToken: Token; range: Range; expression: Expression; } export interface CallableParam { name: string; type: BscType; /** * Is this parameter required or optional? */ isOptional: boolean; /** * Indicates that an unlimited number of arguments can be passed in */ isRestArgument?: boolean; } export interface FileObj { src: string; dest: string; } /** * Represents a file import in a component