aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-27 22:36:50 -0500
committerAlon Zakai <alonzakai@gmail.com>2012-12-27 22:36:50 -0500
commit98d5842444b419181222db88c9a1725ffc174c4b (patch)
tree3ac8a8ab0231184ef6e36878808de01aed1297e6 /src/compiler.js
parent0833e5bbfe9d550714733447fa13a07546574be0 (diff)
compile given ll in compiler.html
Diffstat (limited to 'src/compiler.js')
-rw-r--r--src/compiler.js10
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
+ }
}