import type { ParserRuleContext } from 'antlr4ts'; import type { StringContext, ShortStringContext, SqlStringContext, IdContext } from './lib/Malloy/MalloyParser'; /** * Take the text of a matched string, including the matching quote * characters, and return the actual contents of the string after * \ processing. * @param cx Any parse context which contains a string * @returns Decocded string */ export declare function getShortString(scx: ShortStringContext): string; export declare function getStringIfShort(cx: HasString): string | undefined; export type HasString = { string: () => StringContext; }; type StringPart = ParserRuleContext | string; export declare function getStringParts(cx: SqlStringContext): Generator; export type HasID = ParserRuleContext & { id: () => IdContext; }; /** * An identifier is either a sequence of id characters or a `quoted` * This parses either to simply the resulting text. * @param cx A context which has an identifier * @returns The indenftifier text */ export declare function getId(cx: HasID): string; export declare function idToStr(cx: IdContext): string; export declare function getOptionalId(cx: ParserRuleContext): string | undefined; export declare function unIndent(parts: (string | unknown)[]): void; /** * Returns plain string from string context. * @param cx string context * @param strictCheck returns undefined if non string part is found. * @returns string part and an error list. */ export declare function getPlainString(cx: HasString, strictCheck?: boolean): [string | undefined, ParserRuleContext[]]; export {};