aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-03-05 19:49:49 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-05 19:49:49 +0100
commit57f02d45b7e6ec65c3f2055a2cc4b2c2737167d4 (patch)
tree8e920b3df678e1361440e4f6d32da78acf5f51f4
parentb1fab16befb78232d7a913f58beef639c5891e26 (diff)
downloadsylt-57f02d45b7e6ec65c3f2055a2cc4b2c2737167d4.tar.gz
actual error on invalid outer code
-rw-r--r--progs/tests/faulty.sy2
-rw-r--r--src/compiler.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/progs/tests/faulty.sy b/progs/tests/faulty.sy
index ea1b40d..67605d2 100644
--- a/progs/tests/faulty.sy
+++ b/progs/tests/faulty.sy
@@ -2,4 +2,4 @@ asdflökja;;;;
123
asd
-// errors: [ErrorKind::SyntaxError(_, _)]
+// errors: [ErrorKind::SyntaxError(_, _), ErrorKind::SyntaxError(_, _), ErrorKind::SyntaxError(_, _)]
diff --git a/src/compiler.rs b/src/compiler.rs
index 69ce39a..9f9d6ef 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -1737,7 +1737,8 @@ impl Compiler {
(None, ..) => {}
(a, b, c) => {
- panic!(format!("Unknown outer token sequence: {:?} {:?} {:?}", a, b, c));
+ let msg = format!("Unknown outer token sequence: {:?} {:?} {:?}", a, b, c);
+ error!(self, msg);
}
}
}