From 2589de994d4efe0f16d9614b8cdba534dd49398f Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 30 Jun 2016 10:45:26 -0700 Subject: 3081 Thanks Ella Couch for reporting this. --- 014literal_string.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 '[' -- cgit 1.4.1-2-gfad0