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:
parent
c36198a6f4
commit
14ce019752
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user