mirror of
https://github.com/github/semantic.git
synced 2024-12-18 20:31:55 +03:00
19 lines
285 B
Swift
19 lines
285 B
Swift
enum Argument {
|
|
indirect case File(Source, Argument)
|
|
case End
|
|
|
|
var files: [Source] {
|
|
switch self {
|
|
case let .File(a, rest):
|
|
return [a] + rest.files
|
|
case .End:
|
|
return []
|
|
}
|
|
}
|
|
}
|
|
|
|
let argumentsParser: Madness.Parser<[String], Argument>.Function = none()
|
|
|
|
|
|
import Madness
|