| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 inline Token::Value Select(uc32 next, Token::Value then, Token::Value else_) { | 412 inline Token::Value Select(uc32 next, Token::Value then, Token::Value else_) { |
| 413 Advance(); | 413 Advance(); |
| 414 if (c0_ == next) { | 414 if (c0_ == next) { |
| 415 Advance(); | 415 Advance(); |
| 416 return then; | 416 return then; |
| 417 } else { | 417 } else { |
| 418 return else_; | 418 return else_; |
| 419 } | 419 } |
| 420 } | 420 } |
| 421 | 421 |
| 422 uc32 ScanHexNumber(int expected_length); | 422 uc32 ScanHexEscape(uc32 c, int length); |
| 423 | 423 |
| 424 // Return the current source position. | 424 // Return the current source position. |
| 425 int source_pos() { | 425 int source_pos() { |
| 426 return source_->pos() - kCharacterLookaheadBufferSize; | 426 return source_->pos() - kCharacterLookaheadBufferSize; |
| 427 } | 427 } |
| 428 | 428 |
| 429 UnicodeCache* unicode_cache_; | 429 UnicodeCache* unicode_cache_; |
| 430 | 430 |
| 431 // Buffers collecting literal strings, numbers, etc. | 431 // Buffers collecting literal strings, numbers, etc. |
| 432 LiteralBuffer literal_buffer1_; | 432 LiteralBuffer literal_buffer1_; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 // line-terminator after the current token, and before the next. | 549 // line-terminator after the current token, and before the next. |
| 550 bool has_multiline_comment_before_next_; | 550 bool has_multiline_comment_before_next_; |
| 551 // Whether we scan 'let' as a keyword for harmony block scoped | 551 // Whether we scan 'let' as a keyword for harmony block scoped |
| 552 // let bindings. | 552 // let bindings. |
| 553 bool harmony_block_scoping_; | 553 bool harmony_block_scoping_; |
| 554 }; | 554 }; |
| 555 | 555 |
| 556 } } // namespace v8::internal | 556 } } // namespace v8::internal |
| 557 | 557 |
| 558 #endif // V8_SCANNER_BASE_H_ | 558 #endif // V8_SCANNER_BASE_H_ |
| OLD | NEW |