From b8ec36f27b308b0298c0799cd3523852f84b9611 Mon Sep 17 00:00:00 2001 From: jeshecdom Date: Thu, 9 Jan 2025 18:12:58 +0100 Subject: [PATCH] Fixed CLI command for evaluating expressions. --- src/interpreter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpreter.ts b/src/interpreter.ts index c0d930e41..ebc366d88 100644 --- a/src/interpreter.ts +++ b/src/interpreter.ts @@ -65,7 +65,7 @@ import { idText, isSelfId, } from "./grammar/ast"; -import { AstUtil, divFloor, modFloor } from "./optimizer/util"; +import { AstUtil, divFloor, getAstUtil, modFloor } from "./optimizer/util"; import { getStaticConstant, getStaticFunction, @@ -691,7 +691,7 @@ export function parseAndEvalExpression( sourceCode: string, ast: FactoryAst = getAstFactory(), parser: Parser = getParser(ast, defaultParser), - util: AstUtil, + util: AstUtil = getAstUtil(ast), ): EvalResult { try { const ast = parser.parseExpression(sourceCode);