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

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

Issue 257613003: Update Try Dart to new scanner behavior. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | 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 bc80134611903092a7420be2a7a3dcf9901869fd..d330a7b7446577641d0b633b3c5b743114753837 100644
--- a/dart/site/try/src/editor.dart
+++ b/dart/site/try/src/editor.dart
@@ -6,9 +6,9 @@ library trydart.editor;
import 'dart:html';
-import 'package:compiler/implementation/scanner/scannerlib.dart'
- show
+import 'package:compiler/implementation/scanner/scannerlib.dart' show
EOF_TOKEN,
+ ErrorToken,
StringScanner,
Token;
@@ -200,6 +200,10 @@ void inlineChildren(Element element) {
}
Decoration getDecoration(Token token) {
+ if (token is ErrorToken) {
+ isMalformedInput = true;
+ return new DiagnosticDecoration('error', token.assertionMessage);
+ }
String tokenValue = token.value;
String tokenInfo = token.info.value;
if (tokenInfo == 'string') return currentTheme.string;
« 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