mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
vbscript: Added nothing literal parser/compiler implementation.
This commit is contained in:
parent
efc59d1b19
commit
8864c8dbae
@ -394,6 +394,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
|
||||
return push_instr_str(ctx, OP_new, ((string_expression_t*)expr)->value);
|
||||
case EXPR_NOT:
|
||||
return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_not);
|
||||
case EXPR_NOTHING:
|
||||
return push_instr(ctx, OP_nothing) != -1 ? S_OK : E_OUTOFMEMORY;
|
||||
case EXPR_NULL:
|
||||
return push_instr(ctx, OP_null) != -1 ? S_OK : E_OUTOFMEMORY;
|
||||
case EXPR_OR:
|
||||
|
@ -597,6 +597,12 @@ static HRESULT interp_null(exec_ctx_t *ctx)
|
||||
return stack_push(ctx, &v);
|
||||
}
|
||||
|
||||
static HRESULT interp_nothing(exec_ctx_t *ctx)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT interp_not(exec_ctx_t *ctx)
|
||||
{
|
||||
variant_val_t val;
|
||||
|
@ -36,6 +36,7 @@ typedef enum {
|
||||
EXPR_NEQUAL,
|
||||
EXPR_NEW,
|
||||
EXPR_NOT,
|
||||
EXPR_NOTHING,
|
||||
EXPR_NULL,
|
||||
EXPR_OR,
|
||||
EXPR_STRING,
|
||||
|
@ -274,6 +274,7 @@ LiteralExpression
|
||||
| tDouble { $$ = new_double_expression(ctx, $1); CHECK_ERROR; }
|
||||
| tEMPTY { $$ = new_expression(ctx, EXPR_EMPTY, 0); CHECK_ERROR; }
|
||||
| tNULL { $$ = new_expression(ctx, EXPR_NULL, 0); CHECK_ERROR; }
|
||||
| tNOTHING { $$ = new_expression(ctx, EXPR_NOTHING, 0); CHECK_ERROR; }
|
||||
|
||||
PrimaryExpression
|
||||
: '(' Expression ')' { $$ = $2; }
|
||||
|
@ -152,6 +152,7 @@ typedef enum {
|
||||
X(nequal, 1, 0, 0) \
|
||||
X(new, 1, ARG_STR, 0) \
|
||||
X(not, 1, 0, 0) \
|
||||
X(nothing, 1, 0, 0) \
|
||||
X(null, 1, 0, 0) \
|
||||
X(or, 1, 0, 0) \
|
||||
X(ret, 0, 0, 0) \
|
||||
|
Loading…
Reference in New Issue
Block a user