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

Unified Diff: dart/lib/compiler/implementation/scanner/array_based_scanner.dart

Issue 10913176: Reject non-ASCII identifiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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/lib/compiler/implementation/scanner/scanner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/scanner/array_based_scanner.dart
diff --git a/dart/lib/compiler/implementation/scanner/array_based_scanner.dart b/dart/lib/compiler/implementation/scanner/array_based_scanner.dart
index e8d339608cb8cb0ebb1ffacd1345db3b6ac8af60..d9b4b3bdfd0e6f95eac3fd52ddf6093c5e41d2cb 100644
--- a/dart/lib/compiler/implementation/scanner/array_based_scanner.dart
+++ b/dart/lib/compiler/implementation/scanner/array_based_scanner.dart
@@ -64,10 +64,10 @@ class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> {
// EOF points to itself so there's always infinite look-ahead.
tail.next = tail;
discardOpenLt();
- if (!groupingStack.isEmpty()) {
+ while (!groupingStack.isEmpty()) {
BeginGroupToken begin = groupingStack.head;
- throw new MalformedInputException('Unbalanced ${begin.stringValue}',
- begin);
+ begin.endGroup = tail;
+ groupingStack = groupingStack.tail;
}
}
@@ -111,8 +111,7 @@ class ArrayBasedScanner<S extends SourceString> extends AbstractScanner<S> {
if (openKind !== OPEN_CURLY_BRACKET_TOKEN ||
begin.kind !== STRING_INTERPOLATION_TOKEN) {
// Not ending string interpolation.
- throw new MalformedInputException('Unmatched ${begin.stringValue}',
- begin);
+ return error(new SourceString('Unmatched ${begin.stringValue}'));
}
// We're ending an interpolated expression.
begin.endGroup = tail;
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/scanner/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698