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

Unified Diff: pkg/front_end/lib/src/scanner/scanner.dart

Issue 3010533002: flatten token hierarchy (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | pkg/front_end/lib/src/scanner/token.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/scanner/scanner.dart
diff --git a/pkg/front_end/lib/src/scanner/scanner.dart b/pkg/front_end/lib/src/scanner/scanner.dart
index d20ba0baea2a316ae8f7f2695db1125830bebf1d..bd01cfee4303d17bc8e6910aeb667a5bda42e50a 100644
--- a/pkg/front_end/lib/src/scanner/scanner.dart
+++ b/pkg/front_end/lib/src/scanner/scanner.dart
@@ -490,7 +490,7 @@ abstract class Scanner {
if (_firstComment == null) {
token = new BeginToken(type, _tokenStart);
} else {
- token = new BeginTokenWithComment(type, _tokenStart, _firstComment);
+ token = new BeginToken(type, _tokenStart, _firstComment);
_firstComment = null;
_lastComment = null;
}
@@ -528,7 +528,7 @@ abstract class Scanner {
if (_firstComment == null) {
token = new Token(type, _tokenStart);
} else {
- token = new TokenWithComment(type, _tokenStart, _firstComment);
+ token = new Token(type, _tokenStart, _firstComment);
_firstComment = null;
_lastComment = null;
}
@@ -565,8 +565,8 @@ abstract class Scanner {
if (_firstComment == null) {
_tail = _tail.setNext(new KeywordToken(keyword, _tokenStart));
} else {
- _tail = _tail.setNext(
- new KeywordTokenWithComment(keyword, _tokenStart, _firstComment));
+ _tail =
+ _tail.setNext(new KeywordToken(keyword, _tokenStart, _firstComment));
_firstComment = null;
_lastComment = null;
}
@@ -576,8 +576,8 @@ abstract class Scanner {
if (_firstComment == null) {
_tail = _tail.setNext(new StringToken(type, value, _tokenStart));
} else {
- _tail = _tail.setNext(
- new StringTokenWithComment(type, value, _tokenStart, _firstComment));
+ _tail = _tail
+ .setNext(new StringToken(type, value, _tokenStart, _firstComment));
_firstComment = null;
_lastComment = null;
}
@@ -587,8 +587,8 @@ abstract class Scanner {
if (_firstComment == null) {
_tail = _tail.setNext(new StringToken(type, value, _tokenStart + offset));
} else {
- _tail = _tail.setNext(new StringTokenWithComment(
- type, value, _tokenStart + offset, _firstComment));
+ _tail = _tail.setNext(
+ new StringToken(type, value, _tokenStart + offset, _firstComment));
_firstComment = null;
_lastComment = null;
}
@@ -598,8 +598,7 @@ abstract class Scanner {
if (_firstComment == null) {
_tail = _tail.setNext(new Token(type, _tokenStart));
} else {
- _tail =
- _tail.setNext(new TokenWithComment(type, _tokenStart, _firstComment));
+ _tail = _tail.setNext(new Token(type, _tokenStart, _firstComment));
_firstComment = null;
_lastComment = null;
}
@@ -609,7 +608,7 @@ abstract class Scanner {
if (_firstComment == null) {
_tail = _tail.setNext(new Token(type, offset));
} else {
- _tail = _tail.setNext(new TokenWithComment(type, offset, _firstComment));
+ _tail = _tail.setNext(new Token(type, offset, _firstComment));
_firstComment = null;
_lastComment = null;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | pkg/front_end/lib/src/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698