vbscript: Suport + sign in exponential literals.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
06c43eac6f
commit
0131a9c47b
|
@ -302,9 +302,12 @@ static int parse_numeric_literal(parser_ctx_t *ctx, void **ret)
|
|||
if(*ctx->ptr == 'e' || *ctx->ptr == 'E') {
|
||||
int e = 0, sign = 1;
|
||||
|
||||
if(*++ctx->ptr == '-') {
|
||||
ctx->ptr++;
|
||||
if(*ctx->ptr == '-') {
|
||||
ctx->ptr++;
|
||||
sign = -1;
|
||||
}else if(*ctx->ptr == '+') {
|
||||
ctx->ptr++;
|
||||
}
|
||||
|
||||
if(!iswdigit(*ctx->ptr)) {
|
||||
|
|
|
@ -41,6 +41,7 @@ Call ok(10. = 10, "10. <> 10")
|
|||
Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1")
|
||||
Call ok(&hffFFffFF& = -1, "&hffFFffFF& <> -1")
|
||||
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.789e-2 = 0.56789, "56.789e-2 <> 0.56789")
|
||||
Call ok(1e-94938484 = 0, "1e-... <> 0")
|
||||
|
|
Loading…
Reference in New Issue