| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 Advance(); | 410 Advance(); |
| 411 if (c0_ == next) { | 411 if (c0_ == next) { |
| 412 Advance(); | 412 Advance(); |
| 413 return then; | 413 return then; |
| 414 } else { | 414 } else { |
| 415 return else_; | 415 return else_; |
| 416 } | 416 } |
| 417 } | 417 } |
| 418 | 418 |
| 419 uc32 ScanHexEscape(uc32 c, int length); | 419 uc32 ScanHexEscape(uc32 c, int length); |
| 420 |
| 421 // Scans octal escape sequence. Also accepts "\0" decimal escape sequence. |
| 420 uc32 ScanOctalEscape(uc32 c, int length); | 422 uc32 ScanOctalEscape(uc32 c, int length); |
| 421 | 423 |
| 422 // Return the current source position. | 424 // Return the current source position. |
| 423 int source_pos() { | 425 int source_pos() { |
| 424 return source_->pos() - kCharacterLookaheadBufferSize; | 426 return source_->pos() - kCharacterLookaheadBufferSize; |
| 425 } | 427 } |
| 426 | 428 |
| 427 ScannerConstants* scanner_constants_; | 429 ScannerConstants* scanner_constants_; |
| 428 | 430 |
| 429 // Buffers collecting literal strings, numbers, etc. | 431 // Buffers collecting literal strings, numbers, etc. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 // keyword with the current prefix). | 647 // keyword with the current prefix). |
| 646 const char* keyword_; | 648 const char* keyword_; |
| 647 int counter_; | 649 int counter_; |
| 648 Token::Value keyword_token_; | 650 Token::Value keyword_token_; |
| 649 }; | 651 }; |
| 650 | 652 |
| 651 | 653 |
| 652 } } // namespace v8::internal | 654 } } // namespace v8::internal |
| 653 | 655 |
| 654 #endif // V8_SCANNER_BASE_H_ | 656 #endif // V8_SCANNER_BASE_H_ |
| OLD | NEW |