From 2dd445c1024c22d071d49649fa7b22d0d312dbea Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 16 Mar 2025 23:10:23 +0100 Subject: [PATCH] mondo: support variables --- packages/mondough/mondough.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/mondough/mondough.mjs b/packages/mondough/mondough.mjs index 87089de73..002a7ae5a 100644 --- a/packages/mondough/mondough.mjs +++ b/packages/mondough/mondough.mjs @@ -6,6 +6,9 @@ let runner = new MondoRunner(strudelScope, { pipepost: true, loc: true }); let getLeaf = (value, token) => { const [from, to] = token.loc; + if (strudelScope[value]) { + return strudelScope[value].withLoc(from, to); + } return reify(value).withLoc(from, to); };