From c0599bcbb92af9cbaea52af3560ae08009d1b09d Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Fri, 30 May 2025 11:42:15 +0200 Subject: New printf combinator interface --- driver.fun | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'driver.fun') 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) -- cgit v1.2.3