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

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

Issue 11824067: Support for embedded Dart scripts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 do { 909 do {
910 Scan(); 910 Scan();
911 index++; 911 index++;
912 } while ((token_index >= index) && (current_token_.kind != Token::kEOS)); 912 } while ((token_index >= index) && (current_token_.kind != Token::kEOS));
913 } 913 }
914 914
915 915
916 void Scanner::TokenRangeAtLine(intptr_t line_number, 916 void Scanner::TokenRangeAtLine(intptr_t line_number,
917 intptr_t* first_token_index, 917 intptr_t* first_token_index,
918 intptr_t* last_token_index) { 918 intptr_t* last_token_index) {
919 ASSERT(line_number >= 0); 919 ASSERT(line_number > 0);
920 ASSERT((first_token_index != NULL) && (last_token_index != NULL)); 920 ASSERT((first_token_index != NULL) && (last_token_index != NULL));
921 Reset(); 921 Reset();
922 *first_token_index = -1; 922 *first_token_index = -1;
923 *last_token_index = -1; 923 *last_token_index = -1;
924 int token_index = 0; 924 int token_index = 0;
925 do { 925 do {
926 Scan(); 926 Scan();
927 if (current_token_.position.line >= line_number) { 927 if (current_token_.position.line >= line_number) {
928 *first_token_index = token_index; 928 *first_token_index = token_index;
929 break; 929 break;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 "%c%#"Px"", kPrivateKeySeparator, key_value); 983 "%c%#"Px"", kPrivateKeySeparator, key_value);
984 const String& result = String::Handle(String::New(private_key, Heap::kOld)); 984 const String& result = String::Handle(String::New(private_key, Heap::kOld));
985 return result.raw(); 985 return result.raw();
986 } 986 }
987 987
988 988
989 void Scanner::InitOnce() { 989 void Scanner::InitOnce() {
990 } 990 }
991 991
992 } // namespace dart 992 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698