File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -74,37 +74,30 @@ func parseArguments(_ args: [String]) throws -> Options {
74
74
while let path = iterator. next ( ) {
75
75
opts. inputs. append ( path)
76
76
}
77
- break
78
77
case " -s " :
79
78
opts. silent = true
80
- break
81
79
case " -o " :
82
80
if let path = iterator. next ( ) {
83
81
opts. output = path
84
82
} else {
85
83
throw OptionParseError . missingArgument ( " -o requires a path argument " )
86
84
}
87
- break
88
85
case " -convert " :
89
86
opts. mode = . convert
90
87
if let format = iterator. next ( ) {
91
88
switch format {
92
89
case " xml1 " :
93
90
opts. conversionFormat = . xml1
94
- break
95
91
case " binary1 " :
96
92
opts. conversionFormat = . binary1
97
- break
98
93
case " json " :
99
94
opts. conversionFormat = . json
100
- break
101
95
default :
102
96
throw OptionParseError . invalidFormat ( format)
103
97
}
104
98
} else {
105
99
throw OptionParseError . missingArgument ( " -convert requires a format argument of xml1 binary1 json " )
106
100
}
107
- break
108
101
case " -e " :
109
102
if let ext = iterator. next ( ) {
110
103
opts. fileExtension = ext
@@ -113,18 +106,14 @@ func parseArguments(_ args: [String]) throws -> Options {
113
106
}
114
107
case " -help " :
115
108
opts. mode = . help
116
- break
117
109
case " -lint " :
118
110
opts. mode = . lint
119
- break
120
111
case " -p " :
121
112
opts. mode = . print
122
- break
123
113
default :
124
114
if arg. hasPrefix ( " - " ) && arg. utf8. count > 1 {
125
115
throw OptionParseError . unrecognizedArgument ( arg)
126
116
}
127
- break
128
117
}
129
118
}
130
119
@@ -380,13 +369,10 @@ func main() -> Int32 {
380
369
case . unrecognizedArgument( let arg) :
381
370
print ( " unrecognized option: \( arg) " )
382
371
let _ = help ( )
383
- break
384
372
case . invalidFormat( let format) :
385
373
print ( " unrecognized format \( format) \n format should be one of: xml1 binary1 json " )
386
- break
387
374
case . missingArgument( let errorStr) :
388
375
print ( errorStr)
389
- break
390
376
}
391
377
return EXIT_FAILURE
392
378
}
You can’t perform that action at this time.
0 commit comments