Commit 0131a9c4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Suport + sign in exponential literals.

parent 06c43eac
...@@ -302,9 +302,12 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret) ...@@ -302,9 +302,12 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
if(*ctx->ptr == 'e' || *ctx->ptr == 'E') { if(*ctx->ptr == 'e' || *ctx->ptr == 'E') {
int e = 0, sign = 1; int e = 0, sign = 1;
if(*++ctx->ptr == '-') { ctx->ptr++;
if(*ctx->ptr == '-') {
ctx->ptr++; ctx->ptr++;
sign = -1; sign = -1;
}else if(*ctx->ptr == '+') {
ctx->ptr++;
} }
if(!iswdigit(*ctx->ptr)) { if(!iswdigit(*ctx->ptr)) {
......
...@@ -41,6 +41,7 @@ Call ok(10. = 10, "10. <> 10") ...@@ -41,6 +41,7 @@ Call ok(10. = 10, "10. <> 10")
Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1") Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1")
Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1") Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1")
Call ok(34e5 = 3400000, "34e5 <> 3400000") Call ok(34e5 = 3400000, "34e5 <> 3400000")
Call ok(34e+5 = 3400000, "34e+5 <> 3400000")
Call ok(56.789e5 = 5678900, "56.789e5 = 5678900") Call ok(56.789e5 = 5678900, "56.789e5 = 5678900")
Call ok(56.789e-2 = 0.56789, "56.789e-2 <> 0.56789") Call ok(56.789e-2 = 0.56789, "56.789e-2 <> 0.56789")
Call ok(1e-94938484 = 0, "1e-... <> 0") Call ok(1e-94938484 = 0, "1e-... <> 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