import type { CodePointCharStream, CommonTokenStream, ParserRuleContext, Token } from 'antlr4ts'; import type { DocumentLocation, DocumentPosition, DocumentRange } from '../model/malloy_types'; import type { ParseTree } from 'antlr4ts/tree'; export declare function locationContainsPosition(location: DocumentLocation, position: DocumentPosition): boolean; export declare function isNotUndefined(value: T | undefined): value is T; export interface SourceInfo { lines: string[]; at: { begin: number; end: number; }[]; length: number; } export declare function rangeFromTokens(sourceInfo: SourceInfo | undefined, startToken: Token, stopToken: Token): DocumentRange; export declare function rangeFromToken(sourceInfo: SourceInfo | undefined, token: Token): DocumentRange; export declare function rangeFromContext(sourceInfo: SourceInfo | undefined, pcx: ParserRuleContext): DocumentRange; /** * Split the source up into lines so we can correctly compute offset * to the line/char positions favored by LSP and VSCode. */ export declare function getSourceInfo(code: string): SourceInfo; /** * Rewrites text that is going to be presented to end users to avoid * using terminology that is deprecated or changed. * * @param text raw text that is being used internally in Malloy */ export declare function modernizeTermsForUserText(text: string): string; export interface ParseInfo { root: ParseTree; tokenStream: CommonTokenStream; sourceStream: CodePointCharStream; sourceURL: string; malloyVersion: string; sourceInfo: SourceInfo; }