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

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

Issue 2757153002: update fasta scanner to generate two types of comments (Closed)
Patch Set: rebase Created 3 years, 9 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/front_end/lib/src/fasta/scanner/abstract_scanner.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
index 523ed528bffcd675719c2c06ad5a2a1f095ae82e..67cd48389331a1b1884b8aff9139300a2c505433 100644
--- a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
@@ -186,7 +186,7 @@ abstract class AbstractScanner implements Scanner {
void appendGtGt(PrecedenceInfo info);
/** Documentation in subclass [ArrayBasedScanner]. */
- void appendComment(start, bool asciiOnly);
+ void appendComment(start, PrecedenceInfo info, bool asciiOnly);
/// Append [token] to the token stream.
void appendErrorToken(ErrorToken token);
@@ -279,7 +279,6 @@ abstract class AbstractScanner implements Scanner {
return tokenizeSlashOrComment(next);
}
-
if (identical(next, $OPEN_CURLY_BRACKET)) {
appendBeginGroup(OPEN_CURLY_BRACKET_INFO);
return advance();
@@ -289,7 +288,7 @@ abstract class AbstractScanner implements Scanner {
return tokenizeString(next, scanOffset, false);
}
- if(identical(next, $_)){
+ if (identical(next, $_)) {
return tokenizeKeywordOrIdentifier(next, true);
}
@@ -347,7 +346,7 @@ abstract class AbstractScanner implements Scanner {
return tokenizePlus(next);
}
- if(identical(next, $$)){
+ if (identical(next, $$)) {
return tokenizeKeywordOrIdentifier(next, true);
}
@@ -730,7 +729,7 @@ abstract class AbstractScanner implements Scanner {
identical($CR, next) ||
identical($EOF, next)) {
if (!asciiOnly) handleUnicode(start);
- appendComment(start, asciiOnly);
+ appendComment(start, SINGLE_LINE_COMMENT_INFO, asciiOnly);
return next;
}
}
@@ -754,7 +753,7 @@ abstract class AbstractScanner implements Scanner {
if (0 == nesting) {
if (!asciiOnlyLines) handleUnicode(unicodeStart);
next = advance();
- appendComment(start, asciiOnlyComment);
+ appendComment(start, MULTI_LINE_COMMENT_INFO, asciiOnlyComment);
break;
} else {
next = advance();
« no previous file with comments | « pkg/analyzer/lib/src/fasta/token_utils.dart ('k') | pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698