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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 Advance(); | 402 Advance(); |
403 if (c0_ == next) { | 403 if (c0_ == next) { |
404 Advance(); | 404 Advance(); |
405 return then; | 405 return then; |
406 } else { | 406 } else { |
407 return else_; | 407 return else_; |
408 } | 408 } |
409 } | 409 } |
410 | 410 |
411 uc32 ScanHexEscape(uc32 c, int length); | 411 uc32 ScanHexEscape(uc32 c, int length); |
| 412 |
| 413 // Scans octal escape sequence. Also accepts "\0" decimal escape sequence. |
412 uc32 ScanOctalEscape(uc32 c, int length); | 414 uc32 ScanOctalEscape(uc32 c, int length); |
413 | 415 |
414 // Return the current source position. | 416 // Return the current source position. |
415 int source_pos() { | 417 int source_pos() { |
416 return source_->pos() - kCharacterLookaheadBufferSize; | 418 return source_->pos() - kCharacterLookaheadBufferSize; |
417 } | 419 } |
418 | 420 |
419 // Buffers collecting literal strings, numbers, etc. | 421 // Buffers collecting literal strings, numbers, etc. |
420 LiteralBuffer literal_buffer1_; | 422 LiteralBuffer literal_buffer1_; |
421 LiteralBuffer literal_buffer2_; | 423 LiteralBuffer literal_buffer2_; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 // keyword with the current prefix). | 637 // keyword with the current prefix). |
636 const char* keyword_; | 638 const char* keyword_; |
637 int counter_; | 639 int counter_; |
638 Token::Value keyword_token_; | 640 Token::Value keyword_token_; |
639 }; | 641 }; |
640 | 642 |
641 | 643 |
642 } } // namespace v8::internal | 644 } } // namespace v8::internal |
643 | 645 |
644 #endif // V8_SCANNER_BASE_H_ | 646 #endif // V8_SCANNER_BASE_H_ |
OLD | NEW |