diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index d14e8ded9e0..d39b94e025d 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -361,6 +361,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr) return push_instr(ctx, OP_empty) != -1 ? S_OK : E_OUTOFMEMORY; case EXPR_EQUAL: return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_equal); + case EXPR_EXP: + return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_exp); case EXPR_IDIV: return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_idiv); case EXPR_MEMBER: diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 7a5be72896f..6cf50b9426b 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -738,6 +738,12 @@ static HRESULT interp_mul(exec_ctx_t *ctx) return stack_push(ctx, &v); } +static HRESULT interp_exp(exec_ctx_t *ctx) +{ + FIXME("\n"); + return E_NOTIMPL; +} + static HRESULT interp_neg(exec_ctx_t *ctx) { variant_val_t val; diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index e15a8514a86..cfeb8c0ddd3 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -24,6 +24,7 @@ typedef enum { EXPR_DOUBLE, EXPR_EMPTY, EXPR_EQUAL, + EXPR_EXP, EXPR_IDIV, EXPR_MEMBER, EXPR_MOD, diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 7d574d13474..c9f9c76c4c4 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -210,7 +210,8 @@ MultiplicativeExpression { $$ = new_binary_expression(ctx, EXPR_DIV, $1, $3); CHECK_ERROR; } ExpExpression - : UnaryExpression /* FIXME */ { $$ = $1; } + : UnaryExpression { $$ = $1; } + | ExpExpression '^' UnaryExpression { $$ = new_binary_expression(ctx, EXPR_EXP, $1, $3); CHECK_ERROR; } UnaryExpression : LiteralExpression { $$ = $1; } diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 690cad3e03c..afa9d83f3f5 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -107,6 +107,7 @@ typedef enum { X(double, 1, ARG_DOUBLE, 0) \ X(empty, 1, 0, 0) \ X(equal, 1, 0, 0) \ + X(exp, 1, 0, 0) \ X(icall, 1, ARG_BSTR, ARG_UINT) \ X(icallv, 1, ARG_BSTR, ARG_UINT) \ X(idiv, 1, 0, 0) \