summaryrefslogtreecommitdiff
path: root/driver.fun
diff options
context:
space:
mode:
Diffstat (limited to 'driver.fun')
-rw-r--r--driver.fun15
1 files changed, 13 insertions, 2 deletions
diff --git a/driver.fun b/driver.fun
index 3e2df5e..ff99091 100644
--- a/driver.fun
+++ b/driver.fun
@@ -53,9 +53,20 @@ functor Driver(P: PARSER): DRIVER = struct
Normal =>
let
val parseCtx = P.createParseCtx file (#includeDirs config)
- val (_, _) = P.parseDef parseCtx
+
+ fun collect ctx =
+ let
+ val result = P.parseDef ctx
+ in
+ case result of
+ NONE => ()
+ | SOME (def, ctx) => (
+ P.printDef def;
+ collect ctx
+ )
+ end
in
- raise Unimplemented
+ collect parseCtx
end
| DebugT => P.P.T.debugPrint file
| DebugE => P.P.debugPrint file (#includeDirs config)