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

Unified Diff: pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart

Issue 2743673003: Minor clean-ups to token_stream_rewriter.dart. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart b/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
index 39893c2ec105209cf5d7f7a5f8adf04b4c3ac445..19955738e354e0261f236d139de9f5001078e31a 100644
--- a/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
+++ b/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
@@ -44,11 +44,13 @@ class TokenStreamRewriter {
_lastPreviousToken = previous;
newToken.next = insertionPoint;
previous.next = newToken;
- // Note: even though previousToken is deprecated, we need to hook it up in
- // case any uses of it remain. Once previousToken is removed it should be
- // safe to remove the code below.
- insertionPoint.previousToken = newToken;
- newToken.previousToken = previous;
+ {
+ // Note: even though previousToken is deprecated, we need to hook it up in
+ // case any uses of it remain. Once previousToken is removed it should be
+ // safe to remove this block of code.
+ insertionPoint.previousToken = newToken;
+ newToken.previousToken = previous;
+ }
}
/// Finds the token that immediately precedes [target].
@@ -81,7 +83,7 @@ class TokenStreamRewriter {
/// Searches for the token that immediately precedes [target], using [pos] as
/// a starting point.
///
- /// Uses heuristics to skip matching {}, [], (), and <> if possible.
+ /// Uses heuristics to skip matching `{}`, `[]`, `()`, and `<>` if possible.
///
/// If no such token is found, returns `null`.
Token _scanForPreviousToken(Token target, Token pos) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698