From: Stephen Dolan Date: Mon, 26 Nov 2012 01:40:35 +0000 (+0000) Subject: Raise a proper error from the lexer on unmatched },),] X-Git-Tag: jq-1.2~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c658475681fdd2a12c9239976776684ff3d6375;p=jq Raise a proper error from the lexer on unmatched },),] --- diff --git a/lexer.l b/lexer.l index e0bb2b7..b09ccce 100644 --- 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) {