Skip to content

Commit

Permalink
Fix JS output routine which (incorrectly) removed the asterisk from
Browse files Browse the repository at this point in the history
`yield *`. 
Improve syntax testing to catch differences in primitive values in ASTs
  • Loading branch information
matAtWork committed Sep 5, 2016
1 parent 02e421e commit c0eb8dc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,11 @@ The test is a simple set of nested loops calling async functions that don't do m
Changelog
==========

05-Sep-16 v2.6.6

- Fix JS output routine which (incorrectly) removed the asterisk from `yield *`.
- Improve syntax testing to catch differences in primitive values in ASTs

26-Aug-16 v2.6.5

- Fix JS output routine which (incorrectly) removed parenthesis from `a || (()=>b)` causing a precedence problem.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodent",
"version": "2.6.5",
"version": "2.6.6",
"description": "NoDent - Asynchronous Javascript language extensions",
"main": "nodent.js",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions tests/syntax/yield.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function *w(){
var a = yield 1 ;
var b = yield* 2 ;
}

2 changes: 1 addition & 1 deletion tests/test-syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function eqTree(a,b,p) {
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]])
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) ;

for (var i=0;i<ka.length;i++)
Expand Down

0 comments on commit c0eb8dc

Please sign in to comment.