Comparing version 0.3.2 to 0.3.3
{ | ||
"name": "rocambole", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Recursively walk and transform EcmaScript AST", | ||
@@ -5,0 +5,0 @@ "main": "rocambole.js", |
@@ -230,2 +230,6 @@ # Rocambole [![Build Status](https://secure.travis-ci.org/millermedeiros/rocambole.png?branch=master)](https://travis-ci.org/millermedeiros/rocambole) | ||
### v0.3.3 (2014/04/26) | ||
- add `toString` to empty programs AST (#16) | ||
### v0.3.2 (2014/01/17) | ||
@@ -232,0 +236,0 @@ |
@@ -58,2 +58,3 @@ /*jshint node:true */ | ||
ast.startToken = ast.endToken = null; | ||
ast.toString = _nodeProto.toString; | ||
return ast; | ||
@@ -106,2 +107,3 @@ } | ||
var token = this.startToken; | ||
if (!token) return str; | ||
do { | ||
@@ -108,0 +110,0 @@ str += ('raw' in token)? token.raw : token.value; |
@@ -322,2 +322,4 @@ /*global describe:false, it:false, beforeEach:false */ | ||
tokens: [], | ||
// we check toString behavior later | ||
toString: ast.toString, | ||
startToken: null, | ||
@@ -328,2 +330,6 @@ endToken: null, | ||
}); | ||
it('toString should return proper value', function() { | ||
var ast = rocambole.parse(''); | ||
expect(ast.toString()).to.be(''); | ||
}); | ||
}); | ||
@@ -330,0 +336,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
414077
9310
281