|
fasta scanner recovery and error code translation improvements
* cleanup defaultRecoveryStrategy next/previous and eof
* add SymbolToken.eof() constructor to ensure that EOF tokens
are correctly self referencing
* add fasta.scanString method to match scan method
* add fasta.ScannerResult.hasErrors field
so that scan and scanString callers can quickly check for errors
* new scanner replacement test
which scans using fasta then asserts as if it were from analyzer
* improve SymbolToken.toString() for EOF
* update analyzer test :: fasta scanner considers "<" to be an opener
* extract and move translateErrorToken into front_end
* address comments in https://codereview.chromium.org/2763833002
R=ahe@google.com, paulberry@google.com
Committed: https://github.com/dart-lang/sdk/commit/186c6f23bd2987b3a356946fa6706f38a52d7e40
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+427 lines, -97 lines) |
Patch |
|
M |
pkg/analyzer/lib/src/fasta/token_utils.dart
|
View
|
|
7 chunks |
+5 lines, -77 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/scanner.dart
|
View
|
|
3 chunks |
+24 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/scanner/recover.dart
|
View
|
|
3 chunks |
+14 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/scanner/token.dart
|
View
|
1
2
|
2 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/scanner/errors.dart
|
View
|
|
2 chunks |
+78 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
|
View
|
1
2
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
A |
pkg/front_end/test/scanner_replacement_test.dart
|
View
|
|
1 chunk |
+280 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/test/scanner_test.dart
|
View
|
|
1 chunk |
+9 lines, -5 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/tool/fasta_perf.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 7 (2 generated)
|