diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-04-04 20:53:56 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-04-04 20:53:56 +0200 |
commit | 9d724f17e813fa344d485329d33b5f5ecf8197a3 (patch) | |
tree | 5061e604ea88a379db975b13c1d20688007cacc8 /ccross.sml | |
parent | 7b29b31648fd737e7bbc007f480b799add91bc6b (diff) |
Functorization
Diffstat (limited to 'ccross.sml')
-rw-r--r-- | ccross.sml | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,4 +1,16 @@ -fun main [fname] = Cpp.debugPrint fname +structure ccross:> CCROSS = struct + structure T:> TOKENIZER = + Tokenizer(structure H = Hashtable; structure S = Stream) + + structure P:> CPP = Cpp(T) + + structure ExnHandler:> EXN_HANDLER = + ExnHandler(structure T = T; structure P = P) +end + +val () = MLton.Exn.setTopLevelHandler ccross.ExnHandler.handler + +fun main [fname] = ccross.P.debugPrint fname | main _ = printLn "Expected a single argument: file name" val () = main $ CommandLine.arguments () |