summaryrefslogtreecommitdiff
path: root/src/Grasp
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2014-05-05 12:10:18 +1000
committerJed Barber <jjbarber@y7mail.com>2014-05-05 12:10:18 +1000
commit5044a550bdc0e50431f982d4f35ab3841f000252 (patch)
tree40feb386ccb7a246e7e225a7ea342b572073a286 /src/Grasp
parent0bd004b64fa2da9cb02edc0c4242e03904cef764 (diff)
Skeleton of interpreter added
Diffstat (limited to 'src/Grasp')
-rw-r--r--src/Grasp/Interpreter.hs35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/Grasp/Interpreter.hs b/src/Grasp/Interpreter.hs
new file mode 100644
index 0000000..19b9a0f
--- /dev/null
+++ b/src/Grasp/Interpreter.hs
@@ -0,0 +1,35 @@
+module Grasp.Interpreter (
+ grasp
+ ) where
+
+
+import Grasp.Types
+import Grasp.Parser
+
+
+
+type IP = [LNode String]
+
+
+
+
+grasp :: GraspProgram -> IO ()
+grasp g =
+ let ips = map (:[]) (nodesWithName g "grasp:main")
+ in interpret g ips
+
+
+
+reachable :: GraspProgram -> [LNode String]
+reachable g = []
+
+
+
+garbageCollect :: GraspProgram -> GraspProgram
+garbageCollect g = g
+
+
+
+interpret :: GraspProgram -> [IP] -> IO ()
+interpret g ips = return ()
+