mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-25 21:55:20 +02:00
b2/lang.y (parse_jump): improve diagnostic for code after end/ignore
Before, the error was a rather confusing "unknown keyword", suggesting a typo.
This commit is contained in:
parent
ed8df3f94e
commit
bca50f009f
@ -77,6 +77,8 @@ static struct subst *parse_jump(const char *keyword, const char *target)
|
||||
return subst_break(target);
|
||||
if (!strcmp(keyword, "continue"))
|
||||
return subst_continue(target);
|
||||
if (!strcmp(keyword, "end") || !strcmp(keyword, "ignore"))
|
||||
yyerror("unreachable code");
|
||||
yyerrorf("unknown keyword \"%s\"", keyword);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user