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

Unified Diff: dart/site/try/src/editor.dart

Issue 373563002: Handle multiline interpolated strings in line-based scanner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: getDecoration has side effects Created 6 years, 5 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 | dart/site/try/src/interaction_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/src/editor.dart
diff --git a/dart/site/try/src/editor.dart b/dart/site/try/src/editor.dart
index afe92ab8b111c8086cf527acc224eaef24be6b8e..4d8cb12c04aee136f88295d6b5cd23a0ea7109d5 100644
--- a/dart/site/try/src/editor.dart
+++ b/dart/site/try/src/editor.dart
@@ -234,6 +234,8 @@ addDiagnostic(String kind, String message, int begin, int end) {
Decoration getDecoration(Token token) {
if (token is ErrorToken) {
+ // TODO(ahe): Remove side effects from this method. It only leads to
+ // confusion.
isMalformedInput = true;
return new DiagnosticDecoration('error', token.assertionMessage);
}
@@ -251,6 +253,8 @@ Decoration getDecoration(Token token) {
if (tokenInfo == 'keyword') return currentTheme.keyword;
if (tokenInfo == 'comment') return currentTheme.singleLineComment;
if (tokenInfo == 'malformed input') {
+ // TODO(ahe): Remove side effects from this method. It only leads to
+ // confusion.
isMalformedInput = true;
return new DiagnosticDecoration('error', tokenValue);
}
« no previous file with comments | « no previous file | dart/site/try/src/interaction_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698