Mercurial > urweb
diff src/compiler.sml @ 2046:ced78ef1c82f
New .urp directive: file
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 31 Jul 2014 09:56:41 -0400 |
parents | 403f0cc65b9c |
children | a9159911c3ba |
line wrap: on
line diff
--- a/src/compiler.sml Mon Jul 28 20:18:43 2014 -0400 +++ b/src/compiler.sml Thu Jul 31 09:56:41 2014 -0400 @@ -461,6 +461,8 @@ end else let + val thisPath = OS.Path.dir fname + val pathmap = ref (!pathmap) val bigLibs = ref [] @@ -876,6 +878,13 @@ | "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