1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Add a parser for flags.

This commit is contained in:
Rob Rix 2015-11-02 11:51:13 -05:00
parent c36198a6f4
commit 14ce019752

View File

@ -29,9 +29,12 @@ enum Argument {
}
}
private let validFlags: Set<String> = [ "--unified", "--split" ]
private let flag: Madness.Parser<[String], Argument.Output>.Function =
const(Argument.Output.Unified) <^> satisfy { $0 == "--unified" }
<|> const(Argument.Output.Split) <^> satisfy { $0 == "--split" }
let argumentsParser: Madness.Parser<[String], Argument>.Function = none()
import Madness
import Prelude