|
Move scanner into pkg/front_end/lib/src/scanner.
Several support classes also had to move to front_end along with the
scanner. Some of these support classes arguably don't belong to the
scanner itself, since they have other uses (e.g. SyntacticEntity,
ErrorCode, ErrorSeverity, ErrorType, and StringUtilities). They will
be reorganized into a more appropriate location in future CLs, at the
time that they become needed by other components of the front end.
In order to avoid dragging in a lot of dependencies, the following
changes were made:
1. Scanner no longer reports errors through Source and
AnalysisErrorListener objects passed to the constructor. Instead, it
provides an abstract reportError() method which clients may override
to perform error reporting in any way they wish. Analyzer contains an
override of Scanner that mimics the old behavior in order to maintain
compatibility.
2. Static members of ErrorCode (`values` and `byUniqueName`) have been
moved to top level, and remain in analyzer. To maintain
compatibility, these static members remain in ErrorCode (as deprecated
members that simply wrap the implementations in analyzer). This means
we have a reverse dependency (front_end depends on analyzer), but this
dependency will go away as soon as we publish the next breaking change
release of analyzer.
R=brianwilkerson@google.com, scheglov@google.com
Committed: https://github.com/dart-lang/sdk/commit/0a1fb8d248b1a2ca4cfe145a204ce4c7c3ef0206
Total comments: 23
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1681 lines, -3712 lines) |
Patch |
|
M |
pkg/analyzer/lib/dart/ast/syntactic_entity.dart
|
View
|
|
1 chunk |
+2 lines, -22 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/dart/ast/token.dart
|
View
|
|
1 chunk |
+2 lines, -734 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/error/error.dart
|
View
|
|
3 chunks |
+617 lines, -900 lines |
4 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/dart/analysis/driver.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/dart/ast/token.dart
|
View
|
|
2 chunks |
+15 lines, -553 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
|
View
|
|
2 chunks |
+2 lines, -54 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/dart/scanner/reader.dart
|
View
|
|
2 chunks |
+4 lines, -41 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/dart/scanner/scanner.dart
|
View
|
|
2 chunks |
+11 lines, -1312 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/interner.dart
|
View
|
|
2 chunks |
+4 lines, -20 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/task/options.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/pubspec.yaml
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/inheritance_manager_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/non_hint_code_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/parser_test.dart
|
View
|
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/resolver_test_case.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/test_support.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/src/dart/constant/evaluation_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A |
pkg/front_end/lib/src/scanner/errors.dart
|
View
|
|
1 chunk |
+361 lines, -0 lines |
6 comments
|
Download
|
|
A + |
pkg/front_end/lib/src/scanner/interner.dart
|
View
|
|
2 chunks |
+2 lines, -25 lines |
4 comments
|
Download
|
|
A |
pkg/front_end/lib/src/scanner/reader.dart
|
View
|
|
1 chunk |
+46 lines, -0 lines |
2 comments
|
Download
|
|
A + |
pkg/front_end/lib/src/scanner/scanner.dart
|
View
|
|
5 chunks |
+18 lines, -30 lines |
0 comments
|
Download
|
|
A |
pkg/front_end/lib/src/scanner/string_utilities.dart
|
View
|
|
1 chunk |
+28 lines, -0 lines |
1 comment
|
Download
|
|
A + |
pkg/front_end/lib/src/scanner/syntactic_entity.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
2 comments
|
Download
|
|
A + |
pkg/front_end/lib/src/scanner/token.dart
|
View
|
|
4 chunks |
+554 lines, -7 lines |
4 comments
|
Download
|
Total messages: 13 (3 generated)
|