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 ScanHexEscape(uc32 c, int length); | 422 uc32 ScanHexNumber(int expected_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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 // inside multiline comments. | 538 // inside multiline comments. |
539 bool has_line_terminator_before_next_; | 539 bool has_line_terminator_before_next_; |
540 // Whether there is a multi-line comment that contains a | 540 // Whether there is a multi-line comment that contains a |
541 // line-terminator after the current token, and before the next. | 541 // line-terminator after the current token, and before the next. |
542 bool has_multiline_comment_before_next_; | 542 bool has_multiline_comment_before_next_; |
543 }; | 543 }; |
544 | 544 |
545 } } // namespace v8::internal | 545 } } // namespace v8::internal |
546 | 546 |
547 #endif // V8_SCANNER_BASE_H_ | 547 #endif // V8_SCANNER_BASE_H_ |
OLD | NEW |