From 3154131cddb8bc8fe76b86bd9f4902f1d531bce6 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 31 Jul 2014 09:56:41 -0400 Subject: New .urp directive: file --- src/compiler.sml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/compiler.sml') diff --git a/src/compiler.sml b/src/compiler.sml index 269a7824..2190684a 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -461,6 +461,8 @@ fun parseUrp' accLibs fname = end else let + val thisPath = OS.Path.dir fname + val pathmap = ref (!pathmap) val bigLibs = ref [] @@ -876,6 +878,13 @@ fun parseUrp' accLibs fname = | "html5" => Settings.setIsHtml5 true | "lessSafeFfi" => Settings.setLessSafeFfi true + | "file" => + (case String.fields Char.isSpace arg of + [uri, fname] => (Settings.setFilePath thisPath; + Settings.addFile {Uri = uri, + LoadFromFilename = fname}) + | _ => ErrorMsg.error "Bad 'file' arguments") + | _ => ErrorMsg.error ("Unrecognized command '" ^ cmd ^ "'"); read () end -- cgit v1.2.3