import { type VmScript } from '@mirascript/mirascript'; import type { Evaluator } from './main.js'; /** 一般表达式 */ export interface EvalExpressionCache { /** * 源码 */ source: string; /** * 求值函数 */ func: VmScript; /** * 编译错误 */ error: undefined; } /** 编译错误表达式 */ export interface ErrorExpressionCache { /** * 源码 */ source: string; /** * 求值函数 */ func: undefined; /** * 编译错误 */ error: Error; } /** * 表达式缓存 */ export type ExpressionCache = ErrorExpressionCache | EvalExpressionCache; /** * 解析表达式 */ export declare function parse(evaluator: Evaluator | null, expression: string | VmScript, throws: boolean, template: boolean): ExpressionCache; //# sourceMappingURL=parser.d.ts.map