about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-06-30 10:45:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-06-30 10:45:26 -0700
commit2589de994d4efe0f16d9614b8cdba534dd49398f (patch)
tree9439a053df4fdb52544c34a5615de0b2f7cfc9f1
parent1c13f428001ab3f9f75331de09c998dacf00537b (diff)
downloadmu-2589de994d4efe0f16d9614b8cdba534dd49398f.tar.gz
3081
Thanks Ella Couch for reporting this.
-rw-r--r--014literal_string.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/014literal_string.cc b/014literal_string.cc
index 26d7375d..44f16bd5 100644
--- a/014literal_string.cc
+++ b/014literal_string.cc
@@ -106,7 +106,7 @@ void slurp_quoted_comment_aware(istream& in, ostream& out) {
 
 :(after "Parsing reagent(string s)")
 if (s.at(0) == '[') {
-  assert(*s.rbegin() == ']');
+  if (*s.rbegin() != ']') return;  // unbalanced bracket; handled elsewhere
   name = s;
   // delete [] delimiters
   name.erase(0, 1);
@@ -195,3 +195,9 @@ def main [
   copy []
 ]
 +parse:   ingredient: {"": "literal-string"}
+
+:(scenario multiple_unfinished_recipes)
+% Hide_errors = true;
+recipe f1 [
+recipe f2 [
++error: unbalanced '['