carrot / tumblr-theme-parser

a Tumblr theme parser / compiler
GNU General Public License v3.0
28 stars 3 forks source link

better error for unclosed tags #2

Open notslang opened 9 years ago

notslang commented 9 years ago
{block:a}
{block:a}

(which is missing a /block on the 2nd line), will produce:

./tumblr-theme-parser/lib/parser.js:1032
      throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
            ^
SyntaxError: Expected "{", "{/block:", "{block:" or any character but end of input found.

It would be better if it said what tag is unclosed