Commit b0b22974 authored by Guillaume Charifi's avatar Guillaume Charifi

compiler/parser: Check detached annotations earlier.

parent 2c7f1c97
......@@ -1861,13 +1861,13 @@ int parser(struct lexer_output *in, struct bm_ast *out)
goto failed;
}
parser_ignore_newlines_or_semicolons(&ctx, &cur_tok_id);
}
if (ctx.cur_annotations)
{
wprintf(L"Error: Detached annotation in global space.\n");
goto failed;
}
if (ctx.cur_annotations)
{
wprintf(L"Error: Detached annotation in global space.\n");
goto failed;
parser_ignore_newlines_or_semicolons(&ctx, &cur_tok_id);
}
/* Resolve identifiers & look for conflicts pass. */
......
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