diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-04-25 20:06:54 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-08-02 11:08:04 +0200 |
commit | af17bd73e210f16c8947acb8119ff9e2d3c2f054 (patch) | |
tree | d4c148d8f662cfb0707657f21e24e1f80de59719 /src/parser.cpp | |
parent | d94b18819ad4ee3237c46ad43a962d0121f0c3fe (diff) | |
download | sciteco-af17bd73e210f16c8947acb8119ff9e2d3c2f054.tar.gz |
don't abort on unexpected semicolon (break from loop)
the question remains what to do then.
FIXME: consult TECO standard
Diffstat (limited to 'src/parser.cpp')
-rw-r--r-- | src/parser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index d39d9ef..17a11b9 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -936,7 +936,9 @@ StateStart::custom(gchar chr) if (IS_FAILURE(rc)) { expressions.discard_args(); - g_assert(expressions.pop_op() == Expressions::OP_LOOP); + if (expressions.pop_op() != Expressions::OP_LOOP) + /* FIXME: what does standard teco say to this */ + throw Error("Cannot break from loop without loop"); expressions.pop_num(); /* pc */ expressions.pop_num(); /* counter */ |