Add support for JavaScript code generation

This adds a JavaScript language target. The generated JavaScript uses Google
Closure Compiler type annotations and can be compiled using the advanced
compilation mode, which performs type checking and optimizations such as
inlining and dead code elimination. The generated JavaScript also exports all
generated symbols for use with Node.js and RequireJS. This export behavior
can be turned off with the --no-js-exports flag for use with Google Closure
Compiler.
This commit is contained in:
Evan Wallace
2015-08-17 00:56:54 -07:00
parent 94680f5483
commit 224e33ed09
10 changed files with 2818 additions and 2 deletions

5
tests/JavaScriptTest.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
pushd "$(dirname $0)" >/dev/null
test_dir="$(pwd)"
node ${test_dir}/JavaScriptTest