| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Features shared by parsing and pre-parsing scanners. | 5 // Features shared by parsing and pre-parsing scanners. |
| 6 | 6 |
| 7 #ifndef V8_SCANNER_H_ | 7 #ifndef V8_SCANNER_H_ |
| 8 #define V8_SCANNER_H_ | 8 #define V8_SCANNER_H_ |
| 9 | 9 |
| 10 #include "allocation.h" | 10 #include "allocation.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 const char* token = | 398 const char* token = |
| 399 reinterpret_cast<const char*>(literal_one_byte_string().start()); | 399 reinterpret_cast<const char*>(literal_one_byte_string().start()); |
| 400 *is_get = strncmp(token, "get", 3) == 0; | 400 *is_get = strncmp(token, "get", 3) == 0; |
| 401 *is_set = !*is_get && strncmp(token, "set", 3) == 0; | 401 *is_set = !*is_get && strncmp(token, "set", 3) == 0; |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 | 404 |
| 405 int FindNumber(DuplicateFinder* finder, int value); | 405 int FindNumber(DuplicateFinder* finder, int value); |
| 406 int FindSymbol(DuplicateFinder* finder, int value); | 406 int FindSymbol(DuplicateFinder* finder, int value); |
| 407 | 407 |
| 408 void LogSymbol(ParserRecorder* log, int position); | |
| 409 | |
| 410 UnicodeCache* unicode_cache() { return unicode_cache_; } | 408 UnicodeCache* unicode_cache() { return unicode_cache_; } |
| 411 | 409 |
| 412 // Returns the location of the last seen octal literal. | 410 // Returns the location of the last seen octal literal. |
| 413 Location octal_position() const { return octal_pos_; } | 411 Location octal_position() const { return octal_pos_; } |
| 414 void clear_octal_position() { octal_pos_ = Location::invalid(); } | 412 void clear_octal_position() { octal_pos_ = Location::invalid(); } |
| 415 | 413 |
| 416 // Seek forward to the given position. This operation does not | 414 // Seek forward to the given position. This operation does not |
| 417 // work in general, for instance when there are pushed back | 415 // work in general, for instance when there are pushed back |
| 418 // characters, but works for seeking forward until simple delimiter | 416 // characters, but works for seeking forward until simple delimiter |
| 419 // tokens, which is what it is used for. | 417 // tokens, which is what it is used for. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 bool harmony_scoping_; | 629 bool harmony_scoping_; |
| 632 // Whether we scan 'module', 'import', 'export' as keywords. | 630 // Whether we scan 'module', 'import', 'export' as keywords. |
| 633 bool harmony_modules_; | 631 bool harmony_modules_; |
| 634 // Whether we scan 0o777 and 0b111 as numbers. | 632 // Whether we scan 0o777 and 0b111 as numbers. |
| 635 bool harmony_numeric_literals_; | 633 bool harmony_numeric_literals_; |
| 636 }; | 634 }; |
| 637 | 635 |
| 638 } } // namespace v8::internal | 636 } } // namespace v8::internal |
| 639 | 637 |
| 640 #endif // V8_SCANNER_H_ | 638 #endif // V8_SCANNER_H_ |
| OLD | NEW |