added script that triggers a bug
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
|
p = (true);
|
||||||
|
|
||||||
if true
|
if p
|
||||||
a = 1;
|
(a = 1);
|
||||||
else
|
else
|
||||||
a = 2;
|
a = 2;
|
||||||
|
|
||||||
return a;
|
return a;
|
||||||
@@ -338,19 +338,15 @@ static inline _Bool done(Context *ctx)
|
|||||||
return current(ctx) == TDONE;
|
return current(ctx) == TDONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#warning "TEMP"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
static Node *parse_statement(Context *ctx)
|
static Node *parse_statement(Context *ctx)
|
||||||
{
|
{
|
||||||
assert(ctx != NULL);
|
assert(ctx != NULL);
|
||||||
|
|
||||||
switch(current(ctx))
|
switch(current(ctx))
|
||||||
{
|
{
|
||||||
case '*':
|
|
||||||
case '/':
|
|
||||||
case TASS:
|
|
||||||
case TDONE:
|
|
||||||
UNREACHABLE;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case '(':
|
case '(':
|
||||||
case '+':
|
case '+':
|
||||||
case '-':
|
case '-':
|
||||||
@@ -408,7 +404,7 @@ static Node *parse_statement(Context *ctx)
|
|||||||
case TKWFUN:
|
case TKWFUN:
|
||||||
return parse_function_definition(ctx);
|
return parse_function_definition(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
Error_Report(ctx->error, 0, "Got token \"%.*s\" where the start of a statement was expected",
|
Error_Report(ctx->error, 0, "Got token \"%.*s\" where the start of a statement was expected",
|
||||||
ctx->token->length, ctx->src + ctx->token->offset);
|
ctx->token->length, ctx->src + ctx->token->offset);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user