Index: pkg/front_end/lib/src/fasta/command_line.dart |
diff --git a/pkg/front_end/lib/src/fasta/command_line.dart b/pkg/front_end/lib/src/fasta/command_line.dart |
index 643bd923912c08a343f1cab33dd9fc4ebcb371f2..8916a45693b07e44fe1bddb40d7015475c324fdb 100644 |
--- a/pkg/front_end/lib/src/fasta/command_line.dart |
+++ b/pkg/front_end/lib/src/fasta/command_line.dart |
@@ -4,11 +4,12 @@ |
library fasta.command_line; |
-import 'errors.dart' show inputError, internalError; |
+import 'deprecated_problems.dart' |
+ show deprecated_inputError, deprecated_internalProblem; |
-argumentError(String usage, String message) { |
+deprecated_argumentError(String usage, String message) { |
if (usage != null) print(usage); |
- inputError(null, null, message); |
+ deprecated_inputError(null, null, message); |
} |
class ParsedArguments { |
@@ -88,7 +89,8 @@ class CommandLine { |
String value; |
if (valueSpecification != null) { |
if (!iterator.moveNext()) { |
- return argumentError(usage, "Expected value after '$argument'."); |
+ return deprecated_argumentError( |
+ usage, "Expected value after '$argument'."); |
} |
value = iterator.current; |
} else { |
@@ -101,13 +103,13 @@ class CommandLine { |
} |
if (valueSpecification == null) { |
if (value != null) { |
- return argumentError( |
+ return deprecated_argumentError( |
usage, "Argument '$argument' doesn't take a value: '$value'."); |
} |
result.options[argument] = true; |
} else { |
if (valueSpecification is! String && valueSpecification is! Type) { |
- return argumentError( |
+ return deprecated_argumentError( |
usage, |
"Unrecognized type of value " |
"specification: ${valueSpecification.runtimeType}."); |
@@ -124,7 +126,7 @@ class CommandLine { |
case "String": |
case "Uri": |
if (result.options.containsKey(argument)) { |
- return argumentError( |
+ return deprecated_argumentError( |
usage, |
"Multiple values for '$argument': " |
"'${result.options[argument]}' and '$value'."); |
@@ -132,7 +134,7 @@ class CommandLine { |
var parsedValue; |
if (valueSpecification == int) { |
parsedValue = int.parse(value, onError: (_) { |
- return argumentError( |
+ return deprecated_argumentError( |
usage, "Value for '$argument', '$value', isn't an int."); |
}); |
} else if (valueSpecification == bool) { |
@@ -141,7 +143,7 @@ class CommandLine { |
} else if (value == "false" || value == "no") { |
parsedValue = false; |
} else { |
- return argumentError( |
+ return deprecated_argumentError( |
usage, |
"Value for '$argument' is '$value', " |
"but expected one of: 'true', 'false', 'yes', or 'no'."); |
@@ -151,19 +153,19 @@ class CommandLine { |
} else if (valueSpecification == String) { |
parsedValue = value; |
} else if (valueSpecification is String) { |
- return argumentError( |
+ return deprecated_argumentError( |
usage, |
"Unrecognized value specification: " |
"'$valueSpecification', try using a type literal instead."); |
} else { |
// All possible cases should have been handled above. |
- return internalError("assertion failure"); |
+ return deprecated_internalProblem("assertion failure"); |
} |
result.options[argument] = parsedValue; |
break; |
default: |
- return argumentError(usage, |
+ return deprecated_argumentError(usage, |
"Unrecognized value specification: '$valueSpecification'."); |
} |
} |