vbscript: Rename OP_long expression to OP_int.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-08-22 19:31:49 +02:00 committed by Alexandre Julliard
parent d01d629420
commit 9b18772c0b
6 changed files with 13 additions and 13 deletions

View File

@ -536,8 +536,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
return push_instr_str(ctx, OP_string, ((string_expression_t*)expr)->value);
case EXPR_SUB:
return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_sub);
case EXPR_ULONG:
return push_instr_int(ctx, OP_long, ((int_expression_t*)expr)->value);
case EXPR_INT:
return push_instr_int(ctx, OP_int, ((int_expression_t*)expr)->value);
case EXPR_XOR:
return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_xor);
default:
@ -779,7 +779,7 @@ static HRESULT compile_forto_statement(compile_ctx_t *ctx, forto_statement_t *st
if(!push_instr(ctx, OP_val))
return E_OUTOFMEMORY;
}else {
hres = push_instr_int(ctx, OP_long, 1);
hres = push_instr_int(ctx, OP_int, 1);
if(FAILED(hres))
return hres;
}

View File

@ -1315,7 +1315,7 @@ static HRESULT interp_string(exec_ctx_t *ctx)
return stack_push(ctx, &v);
}
static HRESULT interp_long(exec_ctx_t *ctx)
static HRESULT interp_int(exec_ctx_t *ctx)
{
const LONG arg = ctx->instr->arg1.lng;
VARIANT v;

View File

@ -335,7 +335,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
if(use_int && (LONG)d == d) {
*(LONG*)ret = d;
return tLong;
return tInt;
}
r = exp>=0 ? d*pow(10, exp) : d/pow(10, -exp);
@ -376,7 +376,7 @@ static int parse_hex_literal(parser_ctx_t *ctx, LONG *ret)
ctx->ptr++;
*ret = l;
return tLong;
return tInt;
}
static void skip_spaces(parser_ctx_t *ctx)

View File

@ -32,6 +32,7 @@ typedef enum {
EXPR_GTEQ,
EXPR_IDIV,
EXPR_IMP,
EXPR_INT,
EXPR_IS,
EXPR_LT,
EXPR_LTEQ,
@ -49,7 +50,6 @@ typedef enum {
EXPR_OR,
EXPR_STRING,
EXPR_SUB,
EXPR_ULONG,
EXPR_XOR
} expression_type_t;

View File

@ -97,7 +97,7 @@ static statement_t *link_statements(statement_t*,statement_t*);
const_decl_t *const_decl;
case_clausule_t *case_clausule;
unsigned uint;
LONG lng;
LONG integer;
BOOL boolean;
double dbl;
}
@ -119,7 +119,7 @@ static statement_t *link_statements(statement_t*,statement_t*);
%token <string> tNEXT tON tRESUME tGOTO
%token <string> tIdentifier tString
%token <string> tDEFAULT tERROR tEXPLICIT tPROPERTY tSTEP
%token <lng> tLong
%token <integer> tInt
%token <dbl> tDouble
%type <statement> Statement SimpleStatement StatementNl StatementsNl StatementsNl_opt IfStatement Else_opt
@ -381,13 +381,13 @@ LiteralExpression
| tNOTHING { $$ = new_expression(ctx, EXPR_NOTHING, 0); CHECK_ERROR; }
NumericLiteralExpression
: '0' { $$ = new_long_expression(ctx, EXPR_ULONG, 0); CHECK_ERROR; }
| tLong { $$ = new_long_expression(ctx, EXPR_ULONG, $1); CHECK_ERROR; }
: '0' { $$ = new_long_expression(ctx, EXPR_INT, 0); CHECK_ERROR; }
| tInt { $$ = new_long_expression(ctx, EXPR_INT, $1); CHECK_ERROR; }
| tDouble { $$ = new_double_expression(ctx, $1); CHECK_ERROR; }
IntegerValue
: '0' { $$ = 0; }
| tLong { $$ = $1; }
| tInt { $$ = $1; }
PrimaryExpression
: '(' Expression ')' { $$ = new_unary_expression(ctx, EXPR_BRACKETS, $2); }

View File

@ -248,11 +248,11 @@ typedef enum {
X(idiv, 1, 0, 0) \
X(imp, 1, 0, 0) \
X(incc, 1, ARG_BSTR, 0) \
X(int, 1, ARG_INT, 0) \
X(is, 1, 0, 0) \
X(jmp, 0, ARG_ADDR, 0) \
X(jmp_false, 0, ARG_ADDR, 0) \
X(jmp_true, 0, ARG_ADDR, 0) \
X(long, 1, ARG_INT, 0) \
X(lt, 1, 0, 0) \
X(lteq, 1, 0, 0) \
X(mcall, 1, ARG_BSTR, ARG_UINT) \