mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Stub in a source parser.
This currently asserts the lack of errors, which we’ll have to correct. I just don’t know what the right pattern for that should be.
This commit is contained in:
parent
feaa4e3855
commit
7b9e6e778f
@ -33,6 +33,9 @@ private let flag: Madness.Parser<[String], Argument.Output>.Function =
|
||||
const(Argument.Output.Unified) <^> satisfy { $0 == "--unified" }
|
||||
<|> const(Argument.Output.Split) <^> satisfy { $0 == "--split" }
|
||||
|
||||
private let source: Madness.Parser<[String], Source>.Function =
|
||||
{ try! Source($0) } <^> satisfy { !$0.hasPrefix("--") }
|
||||
|
||||
let argumentsParser: Madness.Parser<[String], Argument>.Function =
|
||||
curry(Argument.OutputFlag) <^> flag <*> pure(Argument.End)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user