Skip to content

Commit

Permalink
fix lexer error message when paring attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
cseufert committed Jun 14, 2021
1 parent e402122 commit 50e847f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lexer/attribute.js
Expand Up @@ -16,7 +16,6 @@ module.exports = {
this.unput(1);
return null;
}
// process.stderr.write("Token:" + JSON.stringify(ch) + "\n");
switch (ch) {
case "]":
if (listDepth === 0) {
Expand Down Expand Up @@ -54,6 +53,8 @@ module.exports = {
return this.consume_NUM();
}

throw new Error("what now? " + JSON.stringify(ch));
throw new Error(
`Bad terminal sequence "${ch}" at line ${this.yylineno} (offset ${this.offset})`
);
},
};

0 comments on commit 50e847f

Please sign in to comment.