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

Unified Diff: compiler/java/com/google/dart/compiler/parser/DartParser.java

Issue 9006033: Issue926: NPE while traversing nodes + invalid string interpolation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding test Created 9 years 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: compiler/java/com/google/dart/compiler/parser/DartParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index eda9237afbf361346914e95d8dcaf53123ffec99..ddc622f52d8ea5e0311a705a2223e3e2fc926df3 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -2125,7 +2125,11 @@ public class DartParser extends CompletionHooksParserBase {
}
case EOS: {
reportError(position(), ParserErrorCode.INCOMPLETE_STRING_LITERAL);
- return done(null);
+ if(strings.size() == expressions.size()) {
+ strings.add(DartStringLiteral.get(""));
+ }
+ inString = false;
+ break;
}
default: {
reportError(position(), ParserErrorCode.UNEXPECTED_TOKEN_IN_STRING_INTERPOLATION,

Powered by Google App Engine
This is Rietveld 408576698