Permalink
Browse files

Fixed Case lineno

  • Loading branch information...
1 parent 0d7b590 commit 675de0ae80ff86c35d3b66211dcb851109aebcfd @tj tj committed Oct 4, 2011
Showing with 5 additions and 3 deletions.
  1. +0 −1 lib/nodes/case.js
  2. +5 −2 lib/parser.js
View
@@ -21,7 +21,6 @@ var Node = require('./node');
var Case = exports = module.exports = function Case(expr, block){
this.expr = expr;
this.block = block;
- this.debug = false;
};
/**
View
@@ -253,8 +253,11 @@ Parser.prototype = {
*/
parseCase: function(){
- var val = this.expect('case').val;
- return new nodes.Case(val, this.block());
+ var val = this.expect('case').val
+ , node = new nodes.Case(val);
+ node.line = this.line();
+ node.block = this.block();
+ return node;
},
/**

0 comments on commit 675de0a

Please sign in to comment.