Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Implicit Async Functions #3757

Merged
merged 47 commits into from
Nov 2, 2016
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
911dbb7
changed jison acceptable versions
GabrielRatener Dec 13, 2014
e95ef25
added await support
GabrielRatener Dec 18, 2014
1e27d68
wrong function bug fix
GabrielRatener Dec 18, 2014
0c58ad7
added tests for async/await
GabrielRatener Dec 18, 2014
6ee9746
invalid to have await, yield(from) in same function
GabrielRatener Dec 19, 2014
0c06e15
changed error handling and tests
GabrielRatener Dec 19, 2014
0b03216
bug fix
GabrielRatener Dec 19, 2014
d83b565
made error handling test more rigorous
GabrielRatener Dec 19, 2014
0e46305
fixed merge conflicts
GabrielRatener Jan 16, 2015
361ee23
consolidated harmony test files
GabrielRatener Jan 16, 2015
5a04d02
added async constructor support and tests
GabrielRatener Jan 29, 2015
7c1cae0
update PR and remove async constructors
Sep 9, 2016
4e0ff11
removed .orig files
Sep 9, 2016
70f3032
Fixed browser testing issue
Sep 9, 2016
8890335
keep up to date
Sep 22, 2016
0cdaee0
Minor cleanup
Sep 22, 2016
83347ab
Async test-suite and Cake support, simplified/removed funky tests
Sep 24, 2016
2d878f8
Skip async/await tests when not supported in runtime
Sep 24, 2016
20e4c4b
cleanup
Sep 24, 2016
5885b5a
Replaced polyfill with native JS async/await
Sep 25, 2016
ab097ed
Fixed merge conflicts
Sep 25, 2016
22d3b49
Oops
Sep 25, 2016
2ca8a01
Make 'async' reserved word
Sep 25, 2016
8a34f23
Remove all async polyfills
Sep 26, 2016
2ec3c5f
eliminate merge conflicts
Oct 20, 2016
e142e43
fix merge conflict
Oct 21, 2016
bd12265
keep engine 7+ until backwards compatibility is added
Oct 22, 2016
88fff70
make async testing opt-in
Oct 22, 2016
b083ef1
restore test, remove confusing polyfill language
Oct 22, 2016
2353127
merge
Oct 22, 2016
ed79f56
Revert changes to test runners
GeoffreyBooth Oct 23, 2016
0cb15e4
Only run async tests where async/await is supported (Node 7+ with --h…
GeoffreyBooth Oct 23, 2016
75593d7
remove 'async' from JS reserved words
Oct 23, 2016
7fccb4e
Merge branch 'master' of github.com:GabrielRatener/coffeescript
GeoffreyBooth Oct 23, 2016
f1572c3
The async tests should use their own special async-capable version of…
GeoffreyBooth Oct 23, 2016
8c289dc
Reverting rename of `async`, it’s not a reserved word so there’s no l…
GeoffreyBooth Oct 23, 2016
db435a2
Merge pull request #3 from GeoffreyBooth/async-await
GabrielRatener Oct 23, 2016
04c6ba4
async test refactoring and additions
Oct 23, 2016
596d182
fix merge conflicts
Oct 23, 2016
85a6d56
oops
Oct 25, 2016
48e82b0
Merge branch '2' of https://github.com/jashkenas/coffeescript
Oct 25, 2016
03890a7
sync
Oct 25, 2016
ed57a15
merge
Oct 27, 2016
cc53738
better error reporting for `await`
Oct 27, 2016
5042d7a
more stuff geoffrey wants
Oct 28, 2016
e7d5fd9
fixed litcoffee tests
Oct 28, 2016
9fcb432
change test title
Oct 28, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ test.litcoffee
parser.output
test/fixtures/underscore
test/*.js
!test/promise.js
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this here?

examples/beautiful_code/parse.coffee
*.gem
/node_modules
build.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this here?

3 changes: 2 additions & 1 deletion Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,11 @@ runTests = (CoffeeScript) ->
# Run every test in the `test` folder, recording failures.
files = fs.readdirSync 'test'

# Ignore generators test file if generators are not available
# Ignore generator dependent test files if generators are not available
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore this code block, but make it reference async/await support instead of generators. Assuming #4341 is accepted, the 2 branch will have a minimum required Node version of 6.9.0, which means that generators will be supported by the Node runtime without needing --harmony. But the logic that was applied to generators however long ago when they were behind --harmony will work for us now for async. This would mean that running npm test in regular Node 6.9.0 would run all the tests except the async ones, so that people developing other features don’t need to worry about --harmony and Node nightly builds.

generatorsAreAvailable = '--harmony' in process.execArgv or
'--harmony-generators' in process.execArgv
files.splice files.indexOf('generators.coffee'), 1 if not generatorsAreAvailable
files.splice files.indexOf('async.coffee'), 1 if not generatorsAreAvailable
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have made an unless generatorsAreAvailable block with the two files.splice lines in it.


for file in files when helpers.isCoffee file
literate = helpers.isLiterate file
Expand Down
6 changes: 5 additions & 1 deletion lib/coffee-script/grammar.js

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

4 changes: 2 additions & 2 deletions lib/coffee-script/lexer.js

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

50 changes: 39 additions & 11 deletions lib/coffee-script/nodes.js

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

Loading