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

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

Issue 10911066: Make an empty identifier a scanning error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added more tests. 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 | tests/language/string_interpolation9_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/scanner.dart
diff --git a/lib/compiler/implementation/scanner/scanner.dart b/lib/compiler/implementation/scanner/scanner.dart
index 84af8ad0ab1f9ca936711c4a9a960fd85aa11810..7b04e873b220a3236d2f72df27a9a5a40a88502e 100644
--- a/lib/compiler/implementation/scanner/scanner.dart
+++ b/lib/compiler/implementation/scanner/scanner.dart
@@ -653,6 +653,11 @@ class AbstractScanner<T extends SourceString> implements Scanner {
(next === $$ && allowDollar)) {
next = advance();
} else if (next < 128) {
+ // Identifier ends here.
+ if (start == byteOffset) {
+ throw new MalformedInputException("expected identifier not found",
+ charOffset);
+ }
if (isAscii) {
appendByteStringToken(IDENTIFIER_INFO, asciiString(start, 0));
} else {
« no previous file with comments | « no previous file | tests/language/string_interpolation9_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698