OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library args.src.parser; | 5 library args.src.parser; |
6 | 6 |
7 import '../args.dart'; | 7 import '../args.dart'; |
8 | 8 |
9 final _SOLO_OPT = new RegExp(r'^-([a-zA-Z0-9])$'); | 9 final _SOLO_OPT = new RegExp(r'^-([a-zA-Z0-9])$'); |
10 final _ABBR_OPT = new RegExp(r'^-([a-zA-Z0-9]+)(.*)$'); | 10 final _ABBR_OPT = new RegExp(r'^-([a-zA-Z0-9]+)(.*)$'); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 '"$value" is not an allowed value for option "${option.name}".'); | 272 '"$value" is not an allowed value for option "${option.name}".'); |
273 } | 273 } |
274 | 274 |
275 if (option.allowMultiple) { | 275 if (option.allowMultiple) { |
276 results[option.name].add(value); | 276 results[option.name].add(value); |
277 } else { | 277 } else { |
278 results[option.name] = value; | 278 results[option.name] = value; |
279 } | 279 } |
280 } | 280 } |
281 } | 281 } |
OLD | NEW |