aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/awk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/editors/awk.c b/editors/awk.c
index 2f8a18c8e..607d69487 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -1671,16 +1671,18 @@ static void chain_group(void)
1671 case OC_BREAK: 1671 case OC_BREAK:
1672 debug_printf_parse("%s: OC_BREAK\n", __func__); 1672 debug_printf_parse("%s: OC_BREAK\n", __func__);
1673 n = chain_node(OC_EXEC); 1673 n = chain_node(OC_EXEC);
1674 if (!break_ptr)
1675 syntax_error("'break' not in a loop");
1674 n->a.n = break_ptr; 1676 n->a.n = break_ptr;
1675//TODO: if break_ptr is NULL, syntax error (not in the loop)?
1676 chain_expr(t_info); 1677 chain_expr(t_info);
1677 break; 1678 break;
1678 1679
1679 case OC_CONTINUE: 1680 case OC_CONTINUE:
1680 debug_printf_parse("%s: OC_CONTINUE\n", __func__); 1681 debug_printf_parse("%s: OC_CONTINUE\n", __func__);
1681 n = chain_node(OC_EXEC); 1682 n = chain_node(OC_EXEC);
1683 if (!continue_ptr)
1684 syntax_error("'continue' not in a loop");
1682 n->a.n = continue_ptr; 1685 n->a.n = continue_ptr;
1683//TODO: if continue_ptr is NULL, syntax error (not in the loop)?
1684 chain_expr(t_info); 1686 chain_expr(t_info);
1685 break; 1687 break;
1686 1688