vbscript: Added ME expression parser implementation.
authorJacek Caban <jacek@codeweavers.com>
Mon, 19 Sep 2011 12:09:57 +0000 (14:09 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 19 Sep 2011 16:32:50 +0000 (18:32 +0200)
dlls/vbscript/compile.c
dlls/vbscript/interp.c
dlls/vbscript/parse.h
dlls/vbscript/parser.y
dlls/vbscript/vbscript.h

index 11023781a42d527b53e435bf3b33c6a5a9abe2db..b2c0cc1249707d0b85f6658dbb794be44b62812e 100644 (file)
@@ -405,6 +405,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
         return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_lt);
     case EXPR_LTEQ:
         return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_lteq);
+    case EXPR_ME:
+        return push_instr(ctx, OP_me) != -1 ? S_OK : E_OUTOFMEMORY;
     case EXPR_MEMBER:
         return compile_member_expression(ctx, (member_expression_t*)expr, TRUE);
     case EXPR_MOD:
index 0593a8633389f973be9174d1de7bd9295b82e4b8..831a39d92ed62975d24008eeb436141deacf3c52 100644 (file)
@@ -708,6 +708,12 @@ static HRESULT interp_stop(exec_ctx_t *ctx)
     return S_OK;
 }
 
+static HRESULT interp_me(exec_ctx_t *ctx)
+{
+    FIXME("\n");
+    return E_NOTIMPL;
+}
+
 static HRESULT interp_bool(exec_ctx_t *ctx)
 {
     const VARIANT_BOOL arg = ctx->instr->arg1.lng;
index b61582b9a714e229c913c2eb5e320c0bb94cc713..bff48bbe7fa7d2a1764383615084e2fd7358221d 100644 (file)
@@ -34,6 +34,7 @@ typedef enum {
     EXPR_IS,
     EXPR_LT,
     EXPR_LTEQ,
+    EXPR_ME,
     EXPR_MEMBER,
     EXPR_MOD,
     EXPR_MUL,
index f25d82591c59e4a88f7822d32343871232b433de..a3fb134b63c9c59034bec8e6f1f520069a646379 100644 (file)
@@ -307,6 +307,7 @@ LiteralExpression
 
 PrimaryExpression
     : '(' Expression ')'            { $$ = $2; }
+    | tME                           { $$ = new_expression(ctx, EXPR_ME, 0); CHECK_ERROR; }
 
 ClassDeclaration
     : tCLASS tIdentifier tNL ClassBody tEND tCLASS tNL      { $4->name = $2; $$ = $4; }
index dc842cf19d379891f96609394cacd019e9b922ae..a1e07b90f811473638989ff0aac5a6140273e4d3 100644 (file)
@@ -203,6 +203,7 @@ typedef enum {
     X(lteq,           1, 0,           0)          \
     X(mcall,          1, ARG_BSTR,    ARG_UINT)   \
     X(mcallv,         1, ARG_BSTR,    ARG_UINT)   \
+    X(me,             1, 0,           0)          \
     X(mod,            1, 0,           0)          \
     X(mul,            1, 0,           0)          \
     X(neg,            1, 0,           0)          \