From 5cde815341daf22adbce96b917c75f4a4d7aae89 Mon Sep 17 00:00:00 2001 From: Futago-za Ryuu Date: Wed, 30 Aug 2017 17:58:04 +0100 Subject: [PATCH] Add default export for es format. This is a minor addition that add's a default export statement (e.g. `export default { ... };`) for the es output format. Fixes #525 --- lib/compiler/passes/generate-js.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/compiler/passes/generate-js.js b/lib/compiler/passes/generate-js.js index 4b9124d..acd55fe 100644 --- a/lib/compiler/passes/generate-js.js +++ b/lib/compiler/passes/generate-js.js @@ -1315,6 +1315,8 @@ function generateJS(ast, options) { toplevelCode, "", "export " + generateParserExports() + ";", + "", + "export default " + generateParserObject() + ";", "" );