| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |