Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: pkg/front_end/lib/src/base/errors.dart

Issue 2486923007: Create pkg/front_end/src/base and begin populating with general use classes. (Closed)
Patch Set: Fix formatting Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/base/analysis_target.dart ('k') | pkg/front_end/lib/src/base/source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/base/errors.dart
diff --git a/pkg/front_end/lib/src/scanner/errors.dart b/pkg/front_end/lib/src/base/errors.dart
similarity index 81%
copy from pkg/front_end/lib/src/scanner/errors.dart
copy to pkg/front_end/lib/src/base/errors.dart
index e5f66def1546d0a4d031edf0d72301342d6f9e05..d39953f50ab0739f94f9af899f302bc8c914e4ff 100644
--- a/pkg/front_end/lib/src/scanner/errors.dart
+++ b/pkg/front_end/lib/src/base/errors.dart
@@ -280,57 +280,3 @@ class ErrorType implements Comparable<ErrorType> {
@override
String toString() => name;
}
-
-/**
- * The error codes used for errors detected by the scanner.
- */
-class ScannerErrorCode extends ErrorCode {
- /**
- * Parameters:
- * 0: the illegal character
- */
- static const ScannerErrorCode ILLEGAL_CHARACTER =
- const ScannerErrorCode('ILLEGAL_CHARACTER', "Illegal character '{0}'.");
-
- static const ScannerErrorCode MISSING_DIGIT =
- const ScannerErrorCode('MISSING_DIGIT', "Decimal digit expected.");
-
- static const ScannerErrorCode MISSING_HEX_DIGIT = const ScannerErrorCode(
- 'MISSING_HEX_DIGIT', "Hexidecimal digit expected.");
-
- static const ScannerErrorCode MISSING_QUOTE =
- const ScannerErrorCode('MISSING_QUOTE', "Expected quote (' or \").");
-
- /**
- * Parameters:
- * 0: the path of the file that cannot be read
- */
- static const ScannerErrorCode UNABLE_GET_CONTENT = const ScannerErrorCode(
- 'UNABLE_GET_CONTENT', "Unable to get content of '{0}'.");
-
- static const ScannerErrorCode UNTERMINATED_MULTI_LINE_COMMENT =
- const ScannerErrorCode(
- 'UNTERMINATED_MULTI_LINE_COMMENT',
- "Unterminated multi-line comment.",
- "Try terminating the comment with '*/', or "
- "removing any unbalanced occurances of '/*' (because comments nest in Dart).");
-
- static const ScannerErrorCode UNTERMINATED_STRING_LITERAL =
- const ScannerErrorCode(
- 'UNTERMINATED_STRING_LITERAL', "Unterminated string literal.");
-
- /**
- * Initialize a newly created error code to have the given [name]. The message
- * associated with the error will be created from the given [message]
- * template. The correction associated with the error will be created from the
- * given [correction] template.
- */
- const ScannerErrorCode(String name, String message, [String correction])
- : super(name, message, correction);
-
- @override
- ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
-
- @override
- ErrorType get type => ErrorType.SYNTACTIC_ERROR;
-}
« no previous file with comments | « pkg/front_end/lib/src/base/analysis_target.dart ('k') | pkg/front_end/lib/src/base/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698