mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-22 16:48:27 +02:00
b2/: handle attempts to break/continue (in substitutions) without a block
This commit is contained in:
parent
e56a71e914
commit
ddbf80b542
@ -395,6 +395,8 @@ static void recurse_fin(struct subst *sub, const struct parent *parent)
|
||||
case st_break:
|
||||
/* fall through */
|
||||
case st_continue:
|
||||
if (!parent)
|
||||
yyerror("jump without block");
|
||||
sub->u.jump = resolve_jump(sub->u.tmp, parent);
|
||||
break;
|
||||
default:
|
||||
|
@ -126,4 +126,15 @@ expect <<EOF
|
||||
s:8: cannot find "z"
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
tst_fail "substitutions: continue without block" -q <<EOF
|
||||
!-s
|
||||
continue
|
||||
EOF
|
||||
|
||||
expect <<EOF
|
||||
s:2: jump without block
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user