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

Unified Diff: runtime/vm/scanner.cc

Issue 12880023: Remove legacy syntax support for library import (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « runtime/vm/scanner.h ('k') | runtime/vm/token.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scanner.cc
===================================================================
--- runtime/vm/scanner.cc (revision 20447)
+++ runtime/vm/scanner.cc (working copy)
@@ -412,7 +412,7 @@
}
-void Scanner::ScanLibraryTag() {
+void Scanner::ScanScriptTag() {
ReadChar();
if (c0_ == '!') {
Recognize(Token::kSCRIPTTAG);
@@ -420,27 +420,11 @@
// similar to a line comment.
SkipLine();
return;
- }
- if (!IsLetter(c0_)) {
- ErrorMsg("Unrecognized library tag");
+ } else {
+ ErrorMsg("unexpected character: '#'");
SkipLine();
return;
}
- const String& ident = String::Handle(ConsumeIdentChars(false));
- if (ident.Equals(Symbols::Library())) {
- current_token_.kind = Token::kLEGACY_LIBRARY;
- return;
- }
- if (ident.Equals(Symbols::Import())) {
- current_token_.kind = Token::kLEGACY_IMPORT;
- return;
- }
- if (ident.Equals(Symbols::Source())) {
- current_token_.kind = Token::kLEGACY_SOURCE;
- return;
- }
- ErrorMsg("Unrecognized library token");
- SkipLine();
}
@@ -870,7 +854,7 @@
break;
case '#':
- ScanLibraryTag();
+ ScanScriptTag();
break;
default:
« no previous file with comments | « runtime/vm/scanner.h ('k') | runtime/vm/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698