Commit 8de5db60 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Added stop statement semi-stub implementation.

parent 1e01a176
...@@ -615,6 +615,9 @@ static HRESULT compile_statement(compile_ctx_t *ctx, statement_t *stat) ...@@ -615,6 +615,9 @@ static HRESULT compile_statement(compile_ctx_t *ctx, statement_t *stat)
case STAT_SET: case STAT_SET:
hres = compile_assign_statement(ctx, (assign_statement_t*)stat, TRUE); hres = compile_assign_statement(ctx, (assign_statement_t*)stat, TRUE);
break; break;
case STAT_STOP:
hres = push_instr(ctx, OP_stop) == -1 ? E_OUTOFMEMORY : S_OK;
break;
default: default:
FIXME("Unimplemented statement type %d\n", stat->type); FIXME("Unimplemented statement type %d\n", stat->type);
hres = E_NOTIMPL; hres = E_NOTIMPL;
......
...@@ -576,6 +576,14 @@ static HRESULT interp_ret(exec_ctx_t *ctx) ...@@ -576,6 +576,14 @@ static HRESULT interp_ret(exec_ctx_t *ctx)
return S_OK; return S_OK;
} }
static HRESULT interp_stop(exec_ctx_t *ctx)
{
WARN("\n");
/* NOTE: this should have effect in debugging mode (that we don't support yet) */
return S_OK;
}
static HRESULT interp_bool(exec_ctx_t *ctx) static HRESULT interp_bool(exec_ctx_t *ctx)
{ {
const VARIANT_BOOL arg = ctx->instr->arg1.lng; const VARIANT_BOOL arg = ctx->instr->arg1.lng;
......
...@@ -97,7 +97,8 @@ typedef enum { ...@@ -97,7 +97,8 @@ typedef enum {
STAT_EXITSUB, STAT_EXITSUB,
STAT_FUNC, STAT_FUNC,
STAT_IF, STAT_IF,
STAT_SET STAT_SET,
STAT_STOP
} statement_type_t; } statement_type_t;
typedef struct _statement_t { typedef struct _statement_t {
......
...@@ -157,6 +157,7 @@ Statement ...@@ -157,6 +157,7 @@ Statement
| tEXIT tSUB { $$ = new_statement(ctx, STAT_EXITSUB, 0); CHECK_ERROR; } | tEXIT tSUB { $$ = new_statement(ctx, STAT_EXITSUB, 0); CHECK_ERROR; }
| tSET MemberExpression Arguments_opt '=' Expression | tSET MemberExpression Arguments_opt '=' Expression
{ $2->args = $3; $$ = new_set_statement(ctx, $2, $5); CHECK_ERROR; } { $2->args = $3; $$ = new_set_statement(ctx, $2, $5); CHECK_ERROR; }
| tSTOP { $$ = new_statement(ctx, STAT_STOP, 0); CHECK_ERROR; }
MemberExpression MemberExpression
: tIdentifier { $$ = new_member_expression(ctx, NULL, $1); CHECK_ERROR; } : tIdentifier { $$ = new_member_expression(ctx, NULL, $1); CHECK_ERROR; }
......
...@@ -376,6 +376,9 @@ Private Function TestPrivateFunc ...@@ -376,6 +376,9 @@ Private Function TestPrivateFunc
End Function End Function
Call TestPrivateFunc Call TestPrivateFunc
' Stop has an effect only in debugging mode
Stop
set x = testObj set x = testObj
Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=testObj) = " & getVT(x)) Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=testObj) = " & getVT(x))
......
...@@ -169,6 +169,7 @@ typedef enum { ...@@ -169,6 +169,7 @@ typedef enum {
X(set_ident, 1, ARG_BSTR, 0) \ X(set_ident, 1, ARG_BSTR, 0) \
X(set_member, 1, ARG_BSTR, 0) \ X(set_member, 1, ARG_BSTR, 0) \
X(short, 1, ARG_INT, 0) \ X(short, 1, ARG_INT, 0) \
X(stop, 1, 0, 0) \
X(string, 1, ARG_STR, 0) \ X(string, 1, ARG_STR, 0) \
X(sub, 1, 0, 0) \ X(sub, 1, 0, 0) \
X(xor, 1, 0, 0) X(xor, 1, 0, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment