diff --git a/lib/carto/parser.js b/lib/carto/parser.js index 0c7ed4b..0e1876c 100644 --- a/lib/carto/parser.js +++ b/lib/carto/parser.js @@ -273,11 +273,19 @@ carto.Parser = function Parser(env) { } } if (level > 0) { - // TODO: make invalid instead - throw makeError({ - message: 'Missing closing `}`', - index: i - }); + if (inString) { + // TODO: make invalid instead + throw makeError({ + message: 'Missing closing ' + inString, + index: i + }); + } else { + // TODO: make invalid instead + throw makeError({ + message: 'Missing closing `}`', + index: i + }); + } } return chunks.map(function(c) { return c.join(''); });