From 2506be7b1ac70ddbfb36b537cab6dcb86bdd2cee Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 13 Nov 2014 13:16:49 +1100 Subject: [PATCH] Add support for exporting async functions --- acorn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acorn.js b/acorn.js index 0e9b364416..188df622d6 100644 --- a/acorn.js +++ b/acorn.js @@ -2542,7 +2542,7 @@ function parseExport(node) { next(); // export var|const|let|function|class ...; - if (tokType === _var || tokType === _const || tokType === _let || tokType === _function || tokType === _class) { + if (tokType === _var || tokType === _const || tokType === _let || tokType === _function || tokType === _class || tokType === _async) { node.declaration = parseStatement(); node['default'] = false; node.specifiers = null;