mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
vbscript: Added stop statement semi-stub implementation.
This commit is contained in:
parent
1e01a176a3
commit
8de5db6030
@ -615,6 +615,9 @@ static HRESULT compile_statement(compile_ctx_t *ctx, statement_t *stat)
|
||||
case STAT_SET:
|
||||
hres = compile_assign_statement(ctx, (assign_statement_t*)stat, TRUE);
|
||||
break;
|
||||
case STAT_STOP:
|
||||
hres = push_instr(ctx, OP_stop) == -1 ? E_OUTOFMEMORY : S_OK;
|
||||
break;
|
||||
default:
|
||||
FIXME("Unimplemented statement type %d\n", stat->type);
|
||||
hres = E_NOTIMPL;
|
||||
|
@ -576,6 +576,14 @@ static HRESULT interp_ret(exec_ctx_t *ctx)
|
||||
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)
|
||||
{
|
||||
const VARIANT_BOOL arg = ctx->instr->arg1.lng;
|
||||
|
@ -97,7 +97,8 @@ typedef enum {
|
||||
STAT_EXITSUB,
|
||||
STAT_FUNC,
|
||||
STAT_IF,
|
||||
STAT_SET
|
||||
STAT_SET,
|
||||
STAT_STOP
|
||||
} statement_type_t;
|
||||
|
||||
typedef struct _statement_t {
|
||||
|
@ -157,6 +157,7 @@ Statement
|
||||
| tEXIT tSUB { $$ = new_statement(ctx, STAT_EXITSUB, 0); CHECK_ERROR; }
|
||||
| tSET MemberExpression Arguments_opt '=' Expression
|
||||
{ $2->args = $3; $$ = new_set_statement(ctx, $2, $5); CHECK_ERROR; }
|
||||
| tSTOP { $$ = new_statement(ctx, STAT_STOP, 0); CHECK_ERROR; }
|
||||
|
||||
MemberExpression
|
||||
: tIdentifier { $$ = new_member_expression(ctx, NULL, $1); CHECK_ERROR; }
|
||||
|
@ -376,6 +376,9 @@ Private Function TestPrivateFunc
|
||||
End Function
|
||||
Call TestPrivateFunc
|
||||
|
||||
' Stop has an effect only in debugging mode
|
||||
Stop
|
||||
|
||||
set x = testObj
|
||||
Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=testObj) = " & getVT(x))
|
||||
|
||||
|
@ -169,6 +169,7 @@ typedef enum {
|
||||
X(set_ident, 1, ARG_BSTR, 0) \
|
||||
X(set_member, 1, ARG_BSTR, 0) \
|
||||
X(short, 1, ARG_INT, 0) \
|
||||
X(stop, 1, 0, 0) \
|
||||
X(string, 1, ARG_STR, 0) \
|
||||
X(sub, 1, 0, 0) \
|
||||
X(xor, 1, 0, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user