fix: memoryLimit doesn't work in for tag, #776

This commit is contained in:
Harttle
2024-12-22 15:46:56 +08:00
parent d61855bf72
commit 2af297f81a
4 changed files with 11 additions and 2 deletions
+1
View File
@@ -67,6 +67,7 @@ export function evalQuotedToken (token: QuotedToken) {
function * evalRangeToken (token: RangeToken, ctx: Context) {
const low: number = yield evalToken(token.lhs, ctx)
const high: number = yield evalToken(token.rhs, ctx)
ctx.memoryLimit.use(high - low + 1)
return range(+low, +high + 1)
}