-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from davidchambers/harmony
switch to esprima-fb for Harmony support
- Loading branch information
Showing
11 changed files
with
52 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.11" | ||
- "0.12" | ||
install: | ||
- make setup | ||
script: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
#!/usr/bin/env node | ||
|
||
require('../lib/command'); | ||
// Based on: | ||
// https://github.com/jashkenas/coffeescript/blob/1.9.1/src/command.coffee#L431-L441 | ||
var args = process.argv.slice(1); | ||
var idx = args.indexOf('--nodejs'); | ||
if (idx < 0 || idx === args.length - 1) { | ||
require('../lib/command'); | ||
} else { | ||
require('child_process').spawn( | ||
process.execPath, | ||
args[idx + 1].split(/\s+/).concat(args.slice(0, idx), args.slice(idx + 2)), | ||
{cwd: process.cwd(), env: process.env, stdio: [0, 1, 2]} | ||
).on('exit', process.exit); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function* fibonacci() { | ||
var prev = 0; | ||
var curr = 1; | ||
while (true) { | ||
yield curr; | ||
var next = prev + curr; | ||
prev = curr; | ||
curr = next; | ||
} | ||
} | ||
|
||
// > seq.next().value | ||
// 1 | ||
// > seq.next().value | ||
// 1 | ||
// > seq.next().value | ||
// 2 | ||
// > seq.next().value | ||
// 3 | ||
// > seq.next().value | ||
// 5 | ||
var seq = fibonacci(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = [ | ||
['seq.next().value', [true, 1, 1, 13]], | ||
['seq.next().value', [true, 1, 1, 15]], | ||
['seq.next().value', [true, 2, 2, 17]], | ||
['seq.next().value', [true, 3, 3, 19]], | ||
['seq.next().value', [true, 5, 5, 21]], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters