Commit fe59d1a5 authored by Robert Wilhelm's avatar Robert Wilhelm Committed by Alexandre Julliard

vbscript: Fix vanishing statements.

When adding multiple statements (e.g. colon separated SimpleStatements) in function source_add_statement(), tail of linked list was not adjusted. Signed-off-by: 's avatarRobert Wilhelm <robert.wilhelm@gmx.net> Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6946d78e
......@@ -516,12 +516,17 @@ static void source_add_statement(parser_ctx_t *ctx, statement_t *stat)
if(!stat)
return;
/* concatenate both linked lists */
if(ctx->stats) {
ctx->stats_tail->next = stat;
ctx->stats_tail = stat;
}else {
ctx->stats = ctx->stats_tail = stat;
}
/* find new tail */
while(ctx->stats_tail->next) {
ctx->stats_tail=ctx->stats_tail->next;
}
}
static void source_add_class(parser_ctx_t *ctx, class_decl_t *class_decl)
......
......@@ -67,6 +67,9 @@ Call ok(W = 5, "W = " & W & " expected " & 5)
x = "xx"
Call ok(x = "xx", "x = " & x & " expected ""xx""")
Dim public1 : public1 = 42
Call ok(public1 = 42, "public1=" & public1 & " expected & " & 42)
Call ok(true <> false, "true <> false is false")
Call ok(not (true <> true), "true <> true is true")
Call ok(not ("x" <> "x"), """x"" <> ""x"" is true")
......
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