Jacek Caban : vbscript: Added ME expression parser implementation.

Alexandre Julliard julliard at winehq.org
Mon Sep 19 13:48:44 CDT 2011


Module: wine
Branch: master
Commit: eef966faf77a6ba8b533aec8bf4c54d1a33d34cd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=eef966faf77a6ba8b533aec8bf4c54d1a33d34cd

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Sep 19 14:09:57 2011 +0200

vbscript: Added ME expression parser implementation.

---

 dlls/vbscript/compile.c  |    2 ++
 dlls/vbscript/interp.c   |    6 ++++++
 dlls/vbscript/parse.h    |    1 +
 dlls/vbscript/parser.y   |    1 +
 dlls/vbscript/vbscript.h |    1 +
 5 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c
index 1102378..b2c0cc1 100644
--- a/dlls/vbscript/compile.c
+++ b/dlls/vbscript/compile.c
@@ -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:
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c
index 0593a86..831a39d 100644
--- a/dlls/vbscript/interp.c
+++ b/dlls/vbscript/interp.c
@@ -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;
diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h
index b61582b..bff48bb 100644
--- a/dlls/vbscript/parse.h
+++ b/dlls/vbscript/parse.h
@@ -34,6 +34,7 @@ typedef enum {
     EXPR_IS,
     EXPR_LT,
     EXPR_LTEQ,
+    EXPR_ME,
     EXPR_MEMBER,
     EXPR_MOD,
     EXPR_MUL,
diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y
index f25d825..a3fb134 100644
--- a/dlls/vbscript/parser.y
+++ b/dlls/vbscript/parser.y
@@ -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; }
diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h
index dc842cf..a1e07b9 100644
--- a/dlls/vbscript/vbscript.h
+++ b/dlls/vbscript/vbscript.h
@@ -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)          \




More information about the wine-cvs mailing list