diff src/prepare.sml @ 1073:b2311dfb3158

Initializers and setval
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 14:20:41 -0500
parents 217eb87dde31
children 0657e5adc938
line wrap: on
line diff
--- a/src/prepare.sml	Sun Dec 13 13:00:55 2009 -0500
+++ b/src/prepare.sml	Sun Dec 13 14:20:41 2009 -0500
@@ -273,6 +273,14 @@
         else
             (e, st)
 
+      | ESetval {seq = e1, count = e2} =>
+        let
+            val (e1, st) = prepExp (e1, st)
+            val (e2, st) = prepExp (e2, st)
+        in
+            ((ESetval {seq = e1, count = e2}, loc), st)
+        end
+
       | EUnurlify (e, t) =>
         let
             val (e, st) = prepExp (e, st)
@@ -317,6 +325,12 @@
       | DJavaScript _ => (d, st)
       | DCookie _ => (d, st)
       | DStyle _ => (d, st)
+      | DInitializer e =>
+        let
+            val (e, st) = prepExp (e, st)
+        in
+            ((DInitializer e, loc), st)
+        end
 
 fun prepare (ds, ps) =
     let