summaryrefslogtreecommitdiffstats
path: root/main.sml
blob: c0206915f30f72e4c9101c09af1bc60342a28b3d (plain) (blame)
1
2
3
4
5
6
7
8
9
fun parseFiles (filenames : string list) : (string, Syntax.dec list) Either.either =
  let fun go [] acc = Either.Right (concat (rev acc))
        | go (f :: fs) acc =
            case Parser.parse f
              Either.Right prog => go fs (prog :: acc)
              err => err
  in go [] filenames

val _ = parseFiles (CommandLine.arguments ())