Permalink
Browse files

added unary operator checking

  • Loading branch information...
1 parent acf1c58 commit affdf78ad0364985b305e26933930870f18d0233 @dresende committed Aug 24, 2011
Showing with 4 additions and 2 deletions.
  1. +2 −2 examples/test.js
  2. +2 −0 lib/ast-transformer.js
View
@@ -5,5 +5,5 @@ function helloWorld() {
// "Hola, mundo!"
console.log(_("Hello, world!", "es_ES"));
- return [ MY_CONST, 2, '3' ];
-}
+ return [ MY_CONST, MY_CONST + 1, '3' ];
+}
View
@@ -50,6 +50,8 @@ Transformer.prototype.__crawlAST = function (ast) {
break;
case "assign":
case "binary":
+ case "unary-prefix":
+ case "unary-postfix":
for (var i = 2; i < ast.length; i++) {
ast[i] = this.__crawlAST(ast[i]);
}

0 comments on commit affdf78

Please sign in to comment.