Skip to content

Commit

Permalink
Merge pull request #9 from physikerwelt/master
Browse files Browse the repository at this point in the history
Simplify debugging
  • Loading branch information
Marko Obrovac committed Nov 5, 2015
2 parents 184d119 + a282bfb commit 1322e14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ Enum.prototype.defineVisitor = function(visitorName, o, numArgs) {
var self = this;
numArgs = numArgs || 0;
console.assert(Object.keys(o).length === Object.keys(self).length,
"Missing cases in " + self.name /*+ ": " +
Object.keys(o) + " vs " + Object.keys(self)*/);
"Missing cases in " + self.name + ". Expected:\n" +
Object.keys(self).sort() + " but got: \n" +
Object.keys(o).sort());
Object.keys(o).forEach(function(fname) {
self[fname].prototype[visitorName] = function() {
var args = [];
Expand Down

0 comments on commit 1322e14

Please sign in to comment.