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

Unified Diff: pkg/compiler/lib/src/string_validator.dart

Issue 2907093002: Revert "improve fasta unterminated string recovery" (Closed)
Patch Set: Created 3 years, 7 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 | pkg/front_end/lib/src/fasta/quote.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/string_validator.dart
diff --git a/pkg/compiler/lib/src/string_validator.dart b/pkg/compiler/lib/src/string_validator.dart
index 208353a52f5d666390dfe573a025c2df782a4445..75f59f54a81352479f999f2239cc5b80834047fb 100644
--- a/pkg/compiler/lib/src/string_validator.dart
+++ b/pkg/compiler/lib/src/string_validator.dart
@@ -25,13 +25,7 @@ class StringValidator {
int leftQuote = 0;
int rightQuote = 0;
if (isFirst) leftQuote = quoting.leftQuoteLength;
- if (isLast) {
- // Check for unterminated string
- if (leftQuote < source.length &&
- source[source.length - 1] == quoting.quoteChar) {
- rightQuote = quoting.rightQuoteLength;
- }
- }
+ if (isLast) rightQuote = quoting.rightQuoteLength;
String content = copyWithoutQuotes(source, leftQuote, rightQuote);
return validateString(
token, token.charOffset + leftQuote, content, quoting);
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/quote.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698