Commit 9b18772c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Rename OP_long expression to OP_int.

parent d01d6294
......@@ -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;
}
......
......@@ -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;
......
......@@ -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)
......
......@@ -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;
......
......@@ -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); }
......
......@@ -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) \
......
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