Fix initial detection of labels when compiling a function.

[COMPILER]
* BUG: Fix initial detection of labels when compiling a function.
This commit is contained in:
Benoît Minisini 2023-09-30 23:19:17 +02:00
parent c600f69be3
commit 56ed08af02

View file

@ -404,8 +404,6 @@ static void translate_body()
TRANS_control_init();
for(;;)
{
if (TRANS_newline())
{
look = JOB->current;
@ -413,14 +411,9 @@ static void translate_body()
break;
if (PATTERN_is_identifier(look[0]) && PATTERN_is(look[1], RS_COLON))
{
fprintf(stderr, "TRANS_declare_label\n");
TRANS_declare_label();
}
continue;
}
while (!TRANS_newline())
JOB->current++;
}
@ -435,8 +428,7 @@ static void translate_body()
look = JOB->current;
if (PATTERN_is(look[0], RS_END))
if (TRANS_is_end_function(is_proc, &look[1]))
if (PATTERN_is(look[0], RS_END) && TRANS_is_end_function(is_proc, &look[1]))
break;
if (TRANS_newline())