diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-30 11:42:15 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-30 11:42:15 +0200 |
commit | c0599bcbb92af9cbaea52af3560ae08009d1b09d (patch) | |
tree | 482fec902413c950bec8c252fc7e52a2c34cf910 /driver.fun | |
parent | 8a8a17e19bc4d474436d518f10c4d2dc5314fc0d (diff) |
New printf combinator interface
Diffstat (limited to 'driver.fun')
-rw-r--r-- | driver.fun | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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) |