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

Unified Diff: runtime/vm/scanner.cc

Issue 10054027: Fix for Issue 2367 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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: runtime/vm/scanner.cc
===================================================================
--- runtime/vm/scanner.cc (revision 6436)
+++ runtime/vm/scanner.cc (working copy)
@@ -173,17 +173,19 @@
newline_seen_ = true;
c0_pos_.line++;
c0_pos_.column = 0;
+ if (source_.CharAt(lookahead_pos_) == '\r') {
+ // Replace a sequence of '\r' '\n' with a single '\n'.
+ if (LookaheadChar(1) == '\n') {
+ lookahead_pos_++;
+ }
+ }
}
lookahead_pos_++;
c0_pos_.column++;
c0_ = LookaheadChar(0);
- // Replace '\r' with '\n' and a sequence of
- // '\r' '\n' with a single '\n'.
+ // Replace '\r' with '\n'.
if (c0_ == '\r') {
c0_ = '\n';
- if (LookaheadChar(1) == '\n') {
- lookahead_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