aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-16 05:10:33 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-16 05:10:33 +0100
commite8571577e7728126c1385e32c3a16b7607379ba7 (patch)
tree0d11d9205bf657acf621837502bd0dc04d829117
parentmds-kbdc: annotate tree with source code locations and report where unpopped scopes were pushed (diff)
downloadmds-e8571577e7728126c1385e32c3a16b7607379ba7.tar.gz
mds-e8571577e7728126c1385e32c3a16b7607379ba7.tar.bz2
mds-e8571577e7728126c1385e32c3a16b7607379ba7.tar.xz
mds-kbdc: do not mark runaway } as invalid, but rather runaway
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/mds-kbdc/make-tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mds-kbdc/make-tree.c b/src/mds-kbdc/make-tree.c
index e749a7f..e807df2 100644
--- a/src/mds-kbdc/make-tree.c
+++ b/src/mds-kbdc/make-tree.c
@@ -753,6 +753,10 @@ int parse_to_tree(const char* restrict filename, mds_kbdc_tree_t** restrict resu
}
else if (strchr("\"<([", *line) || strchr(line, '('))
; /* TODO */
+ else if (strchr("}", *line))
+ {
+ NEW_ERROR(1, ERROR, "runaway ‘%c’", *line);
+ }
else
{
NEW_ERROR(1, ERROR, "invalid syntax ‘%s’", line);