Commit 64fd6fa7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Added lexer support for '_'.

parent 16eac43c
......@@ -354,6 +354,7 @@ static int parse_next_token(void *lval, parser_ctx_t *ctx)
case '^':
case '\\':
case '.':
case '_':
return *ctx->ptr++;
case '(':
/* NOTE:
......@@ -402,6 +403,15 @@ int parser_lex(void *lval, parser_ctx_t *ctx)
while(1) {
ret = parse_next_token(lval, ctx);
if(ret == '_') {
skip_spaces(ctx);
if(*ctx->ptr != '\n') {
FIXME("'_' not followed by newline\n");
return 0;
}
ctx->ptr++;
continue;
}
if(ret != tNL || ctx->last_token != tNL)
break;
......
......@@ -177,6 +177,13 @@ Call ok(2^3^2 = 64, "2^3^2 = " & (2^3^2))
Call ok(-3^2 = 9, "-3^2 = " & (-3^2))
Call ok(2*3^2 = 18, "2*3^2 = " & (2*3^2))
x =_
3
x _
= 3
x = 3
if true then y = true : x = y
ok x, "x is false"
......
......@@ -1226,6 +1226,8 @@ static void run_tests(void)
parse_script_a("x = 1\n Call ok(x = 1, \"x = \" & x)");
parse_script_a("x = _ \n3");
test_global_vars_ref(TRUE);
test_global_vars_ref(FALSE);
......
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