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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/scanner.dart

Issue 26096002: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months 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
Index: pkg/analyzer_experimental/lib/src/generated/scanner.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/scanner.dart b/pkg/analyzer_experimental/lib/src/generated/scanner.dart
index 7ee43be4586d09644a2fbb847f1c808b5a090425..b255e75d7b462164bfc0e276b4b00e0b57aaac7c 100644
--- a/pkg/analyzer_experimental/lib/src/generated/scanner.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/scanner.dart
@@ -1107,6 +1107,15 @@ abstract class AbstractScanner {
next = advance();
if (next == -1) {
break outer;
+ } else if (next == 0xD) {
+ next = advance();
+ if (next == 0xA) {
+ next = advance();
+ }
+ recordStartOfLine();
+ } else if (next == 0xA) {
+ recordStartOfLine();
+ next = advance();
}
}
next = advance();
@@ -1151,11 +1160,36 @@ abstract class AbstractScanner {
if (next == -1) {
break;
}
- if (next == 0xD || next == 0xA) {
+ bool missingCharacter = false;
+ if (next == 0xD) {
+ missingCharacter = true;
+ next = advance();
+ if (next == 0xA) {
+ next = advance();
+ }
+ recordStartOfLine();
+ } else if (next == 0xA) {
+ missingCharacter = true;
+ recordStartOfLine();
+ next = advance();
+ } else {
+ next = advance();
+ }
+ if (missingCharacter) {
_errorListener.onError(new AnalysisError.con2(source, offset - 1, 1, ScannerErrorCode.CHARACTER_EXPECTED_AFTER_SLASH, []));
}
+ } else if (next == 0xD) {
+ next = advance();
+ if (next == 0xA) {
+ next = advance();
+ }
+ recordStartOfLine();
+ } else if (next == 0xA) {
+ recordStartOfLine();
+ next = advance();
+ } else {
+ next = advance();
}
- next = advance();
}
reportError(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, []);
appendStringToken(TokenType.STRING, getString(start, 0));
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/resolver.dart ('k') | pkg/analyzer_experimental/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698