File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import SemanticVersion
1818
1919enum Parser {
2020
21- static let dependencyStart = Parse {
21+ static let dependencyStart = Parse ( input : Substring . self ) {
2222 Int . parser ( )
2323 Skip { " dependenc " }
2424 }
@@ -30,7 +30,7 @@ enum Parser {
3030
3131 static let progress = Many { progressLine }
3232
33- static let dependencyCount = Parse {
33+ static let dependencyCount = Parse ( input : Substring . self ) {
3434 Int . parser ( )
3535 Skip {
3636 OneOf {
@@ -56,7 +56,7 @@ enum Parser {
5656
5757 static let newPackageToken : Character = " + "
5858 static let updatedRevisionToken : Character = " ~ "
59- static let upToStart = Parse {
59+ static let upToStart = Parse ( input : Substring . self ) {
6060 Prefix { $0 != newPackageToken && $0 != updatedRevisionToken }
6161 }
6262
@@ -92,14 +92,15 @@ enum Parser {
9292
9393 static let updates = Many ( element: { update } , separator: { " \n " } )
9494
95- static let packageUpdate = Parse { ( count, updates) -> [ Update ] in
96- assert ( updates. count == count)
97- return updates
98- } with: {
95+ static let packageUpdate = Parse {
9996 Skip { progress }
10097 Skip { Many { " \n " } }
10198 dependencyCount
10299 updates
103100 Skip { Many { " \n " } }
101+ } . map { ( count: Int , updates: [ Update ] ) in
102+ assert ( updates. count == count)
103+ return updates
104104 }
105+
105106}
You can’t perform that action at this time.
0 commit comments