Changeset 8491 for src/Pugs.hs
- Timestamp:
- 12/27/05 18:41:39 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs.hs
r8474 r8491 84 84 run ("-C":backend:file:_) = readFile file >>= doCompileDump backend file 85 85 86 run ("-B":backend:_) | (== map toLower backend) `any` ["js","perl5" ] = do86 run ("-B":backend:_) | (== map toLower backend) `any` ["js","perl5","js-perl5"] = do 87 87 exec <- getArg0 88 88 args <- getArgs … … 232 232 else (doExecuteHelper "runjs.pl" args) 233 233 "perl5" -> doExecuteHelper "pugs-p5.pl" args 234 "js-perl5" -> doExecuteHelper "runjs.pl" (jsPerl5Args ++ args) 234 235 _ -> fail ("unknown backend: " ++ backend) 235 236 where 236 237 args' = f args 238 jsPerl5Args = words "--run=jspm --perl5" 237 239 f [] = [] 238 f (bjs:rest) | map toUpper bjs == "-BJS"= f rest239 f ("-B":js:rest) | map toUpper js == "JS"= f rest240 f (bjs:rest) | "-BJS" `isPrefixOf` map toUpper bjs = f rest 241 f ("-B":js:rest) | "JS" `isPrefixOf` map toUpper js = f rest 240 242 f (pugspath:rest) | "--pugs=" `isPrefixOf` pugspath = f rest 241 243 f (x:xs) = x:f xs
