]> granicus.if.org Git - jq/commitdiff
Raise a proper error from the lexer on unmatched },),]
authorStephen Dolan <mu@netsoc.tcd.ie>
Mon, 26 Nov 2012 01:40:35 +0000 (01:40 +0000)
committerStephen Dolan <mu@netsoc.tcd.ie>
Mon, 26 Nov 2012 01:40:35 +0000 (01:40 +0000)
lexer.l

diff --git a/lexer.l b/lexer.l
index e0bb2b7b6fee54e560d05e0d1f47292b345548ce..b09ccce47634a4e1f06c26d627cb62133ab6d698 100644 (file)
--- a/lexer.l
+++ b/lexer.l
@@ -126,6 +126,10 @@ static int try_exit(int c, int state, yyscan_t yyscanner) {
     match = ')'; 
     ret = QQSTRING_INTERP_END;
     break;
+
+  default:
+    // may not be the best error to give
+    return INVALID_CHARACTER;
   }
   assert(match);
   if (match == c) {