diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-27 22:36:50 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-27 22:36:50 -0500 |
commit | 98d5842444b419181222db88c9a1725ffc174c4b (patch) | |
tree | 3ac8a8ab0231184ef6e36878808de01aed1297e6 /src/compiler.js | |
parent | 0833e5bbfe9d550714733447fa13a07546574be0 (diff) |
compile given ll in compiler.html
Diffstat (limited to 'src/compiler.js')
-rw-r--r-- | src/compiler.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler.js b/src/compiler.js index 31d033b4..7395c896 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -268,9 +268,11 @@ function compile(raw) { } } -if (ll_file.indexOf('\n') == -1) { - compile(read(ll_file)); -} else { - compile(ll_file); // we are given raw .ll +if (ll_file) { + if (ll_file.indexOf(String.fromCharCode(10)) == -1) { + compile(read(ll_file)); + } else { + compile(ll_file); // we are given raw .ll + } } |