Mercurial > urweb
diff src/jscomp.sml @ 569:162d5308e34f
Successfully generated a page element from a signal
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 20 Dec 2008 16:19:26 -0500 |
parents | 55fc747a67dc |
children | 57018f21cd5c |
line wrap: on
line diff
--- a/src/jscomp.sml Sat Dec 20 15:46:48 2008 -0500 +++ b/src/jscomp.sml Sat Dec 20 16:19:26 2008 -0500 @@ -285,7 +285,7 @@ in (strcat [str "document.write(", e, - str ")"], st) + str ".v)"], st) end | ESeq (e1, e2) => @@ -317,9 +317,9 @@ let val (e, st) = jsE inner (e, st) in - (strcat [(*str "sreturn(",*) - e(*, - str ")"*)], + (strcat [str "sreturn(", + e, + str ")"], st) end end @@ -369,8 +369,16 @@ {decls = [], script = ""} file + + val inf = TextIO.openIn (OS.Path.joinDirFile {dir = Config.libJs, file = "urweb.js"}) + fun lines acc = + case TextIO.inputLine inf of + NONE => String.concat (rev acc) + | SOME line => lines (line :: acc) + val lines = lines [] in - ds + TextIO.closeIn inf; + (DJavaScript lines, ErrorMsg.dummySpan) :: ds end end