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

Side by Side Diff: runtime/vm/scanner.cc

Issue 9582036: Fix bug 1557 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/scanner.h" 5 #include "vm/scanner.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 void Scanner::ScanLibraryTag() { 377 void Scanner::ScanLibraryTag() {
378 ReadChar(); 378 ReadChar();
379 if (c0_ == '!') { 379 if (c0_ == '!') {
380 Recognize(Token::kSCRIPTTAG); 380 Recognize(Token::kSCRIPTTAG);
381 // The script tag extends to the end of the line. Just treat this 381 // The script tag extends to the end of the line. Just treat this
382 // similar to a line comment. 382 // similar to a line comment.
383 SkipLine(); 383 SkipLine();
384 return; 384 return;
385 } 385 }
386 if (!IsIdentStartChar(c0_)) { 386 if (!IsLetter(c0_)) {
387 ErrorMsg("Unrecognized library tag"); 387 ErrorMsg("Unrecognized library tag");
388 SkipLine(); 388 SkipLine();
389 return; 389 return;
390 } 390 }
391 const String& kLibrary = String::Handle(String::NewSymbol("library")); 391 const String& kLibrary = String::Handle(String::NewSymbol("library"));
392 const String& kImport = String::Handle(String::NewSymbol("import")); 392 const String& kImport = String::Handle(String::NewSymbol("import"));
393 const String& kSource = String::Handle(String::NewSymbol("source")); 393 const String& kSource = String::Handle(String::NewSymbol("source"));
394 const String& kResource = String::Handle(String::NewSymbol("resource")); 394 const String& kResource = String::Handle(String::NewSymbol("resource"));
395 const String& ident = String::Handle(ConsumeIdentChars(false)); 395 const String& ident = String::Handle(ConsumeIdentChars(false));
396 if (ident.Equals(kLibrary)) { 396 if (ident.Equals(kLibrary)) {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 "%c%"PRIxPTR, kPrivateKeySeparator, key_value); 911 "%c%"PRIxPTR, kPrivateKeySeparator, key_value);
912 const String& result = String::Handle(String::New(private_key)); 912 const String& result = String::Handle(String::New(private_key));
913 return result.raw(); 913 return result.raw();
914 } 914 }
915 915
916 916
917 void Scanner::InitOnce() { 917 void Scanner::InitOnce() {
918 } 918 }
919 919
920 } // namespace dart 920 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698