Skip to content

Commit

Permalink
v3.2.0 Refactor
Browse files Browse the repository at this point in the history
Use `nodent-compiler @3.2.0`, which in turn uses the `[email protected]`, which is the base AST transformer (with no parser or code generator), which is also used
Fix tests to not report unecessary mismatch for 'directive' due to acorn v5.4.x
  • Loading branch information
matAtWork committed Apr 18, 2018
1 parent c6a5dce commit 3f247a4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,15 @@ This execution case was pointed out by https://github.com/jods4 - many thanks.
Changelog
==========

18-Apr-18 v3.2.0

- Use `nodent-compiler @3.2.0`, which in turn uses the `[email protected]`, which is the base AST transformer (with no parser or code generator), which is also used
from Babel 7-beta (see https://github.com/babel/babel/pull/7076) and forms the basis of leaner (external) `fast-async` Babel plugin.

10-Apr-18 v3.1.3-8

- Various minor fixes and compatability changes to ensure operation with a variety of versions of acorn, babel, node, etc.

21-Aug-17 v3.1.2

- Correctly walk destructuring assignment initializers
Expand Down
14 changes: 10 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodent",
"version": "3.1.8",
"version": "3.2.0",
"description": "NoDent - Asynchronous Javascript language extensions",
"main": "nodent.js",
"scripts": {
Expand All @@ -13,7 +13,7 @@
"nodentjs": "./nodent.js"
},
"dependencies": {
"nodent-compiler": "^3.1.8",
"nodent-compiler": "^3.2.0",
"nodent-runtime": "^3.2.1",
"resolve": "^1.5.0"
},
Expand Down
9 changes: 5 additions & 4 deletions tests/test-syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,21 @@ function locations(k) {
return ['end','start','loc'].indexOf(k)<0 ;
}

debugger ;
function eqTree(a,b,p) {
if (!p) p = "" ;
var ka = Object.keys(a).filter(locations).sort() ;
var kb = Object.keys(b).filter(locations).sort() ;
if (ka.length != kb.length)
if (ka.length > kb.length)
throw new Error("length("+ka.length+","+kb.length+") "+p) ;

for (var i=0;i<ka.length;i++)
if (ka[i] != kb[i] || typeof a[ka[i]] != typeof b[kb[i]] || (!(a[ka[i]] instanceof Object) && a[ka[i]] !== b[kb[i]]))
throw new Error("key("+ka[i]+","+kb[i]+") "+p) ;
if (typeof a[ka[i]] != typeof b[ka[i]] || (!(a[ka[i]] instanceof Object) && a[ka[i]] !== b[ka[i]]))
throw new Error("key("+ka[i]+","+ka[i]+") "+p) ;

for (var i=0;i<ka.length;i++)
if (typeof a[ka[i]] === 'object' && a[ka[i]])
eqTree(a[ka[i]],b[kb[i]],p+" > "+ka[i]+":"+a[ka[i]].type) ;
eqTree(a[ka[i]],b[ka[i]],p+" > "+ka[i]+":"+a[ka[i]].type) ;
return true ;
}

Expand Down

0 comments on commit 3f247a4

Please sign in to comment.