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

Unified Diff: runtime/vm/scanner.cc

Issue 24240010: Implement symbol literals in the VM compiler (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.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 27665)
+++ runtime/vm/scanner.cc (working copy)
@@ -400,17 +400,11 @@
void Scanner::ScanScriptTag() {
ReadChar();
- if (c0_ == '!') {
- Recognize(Token::kSCRIPTTAG);
- // The script tag extends to the end of the line. Just treat this
- // similar to a line comment.
- SkipLine();
- return;
- } else {
- ErrorMsg("unexpected character: '#'");
- SkipLine();
- return;
- }
+ ASSERT(c0_ == '!');
+ Recognize(Token::kSCRIPTTAG);
+ // The script tag extends to the end of the line. Just treat this
+ // similar to a line comment.
+ SkipLine();
}
@@ -837,7 +831,11 @@
break;
case '#':
- ScanScriptTag();
+ if (LookaheadChar(1) == '!') {
+ ScanScriptTag();
+ } else {
+ Recognize(Token::kHASH);
+ }
break;
default:
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698