test: cases for async variables

This commit is contained in:
Harttle
2022-05-03 13:31:25 +08:00
committed by Harttle
parent 463a165e5e
commit 2f6d84befc
4 changed files with 17 additions and 6 deletions
+3 -3
View File
@@ -25,9 +25,9 @@ export class Expression {
const operands: any[] = []
for (const token of this.postfix) {
if (TypeGuards.isOperatorToken(token)) {
const r = yield operands.pop()
const l = yield operands.pop()
const result = evalOperatorToken(ctx.opts.operators, token, l, r, ctx)
const r = operands.pop()
const l = operands.pop()
const result = yield evalOperatorToken(ctx.opts.operators, token, l, r, ctx)
operands.push(result)
} else {
operands.push(yield evalToken(token, ctx, lenient && this.postfix.length === 1))