import { type Expression } from './program'; import { type ParseWithErrorsResult } from './parse-error'; export type DiceExpressionParseResult = { ok: true; value: Expression; } | { ok: false; message: string; index: number; }; /** * Parse a dice expression. The optional `baseOffset` is added to every * source span attached to identifier nodes produced by the grammar — pass * the offset of `text[0]` within the originating program source so * `Identifier.loc` values point into the program rather than into the * dice slice. Callers that parse a standalone dice expression should * leave `baseOffset` unset. */ export declare function parseDiceExpression(text: string, baseOffset?: number | undefined): DiceExpressionParseResult; export declare function parseDiceExpressionOrNull(text: string, baseOffset?: number | undefined): Expression | null; export declare function parseDiceExpressionWithErrors(text: string, baseOffset?: number | undefined): ParseWithErrorsResult;