| 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 #include "src/parsing/scanner.h" | 7 #include "src/parsing/scanner.h" | 
| 8 | 8 | 
| 9 #include <stdint.h> | 9 #include <stdint.h> | 
| 10 | 10 | 
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 557         } else { | 557         } else { | 
| 558           token = Token::ADD; | 558           token = Token::ADD; | 
| 559         } | 559         } | 
| 560         break; | 560         break; | 
| 561 | 561 | 
| 562       case '-': | 562       case '-': | 
| 563         // - -- --> -= | 563         // - -- --> -= | 
| 564         Advance(); | 564         Advance(); | 
| 565         if (c0_ == '-') { | 565         if (c0_ == '-') { | 
| 566           Advance(); | 566           Advance(); | 
| 567           if (c0_ == '>' && has_line_terminator_before_next_) { | 567           if (c0_ == '>' && HasAnyLineTerminatorBeforeNext()) { | 
| 568             // For compatibility with SpiderMonkey, we skip lines that | 568             // For compatibility with SpiderMonkey, we skip lines that | 
| 569             // start with an HTML comment end '-->'. | 569             // start with an HTML comment end '-->'. | 
| 570             token = SkipSingleLineComment(); | 570             token = SkipSingleLineComment(); | 
| 571           } else { | 571           } else { | 
| 572             token = Token::DEC; | 572             token = Token::DEC; | 
| 573           } | 573           } | 
| 574         } else if (c0_ == '=') { | 574         } else if (c0_ == '=') { | 
| 575           token = Select(Token::ASSIGN_SUB); | 575           token = Select(Token::ASSIGN_SUB); | 
| 576         } else { | 576         } else { | 
| 577           token = Token::SUB; | 577           token = Token::SUB; | 
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1705     backing_store_.Add(static_cast<uint8_t>((one_byte_length >> 7) | 0x80u)); | 1705     backing_store_.Add(static_cast<uint8_t>((one_byte_length >> 7) | 0x80u)); | 
| 1706   } | 1706   } | 
| 1707   backing_store_.Add(static_cast<uint8_t>(one_byte_length & 0x7f)); | 1707   backing_store_.Add(static_cast<uint8_t>(one_byte_length & 0x7f)); | 
| 1708 | 1708 | 
| 1709   backing_store_.AddBlock(bytes); | 1709   backing_store_.AddBlock(bytes); | 
| 1710   return backing_store_.EndSequence().start(); | 1710   return backing_store_.EndSequence().start(); | 
| 1711 } | 1711 } | 
| 1712 | 1712 | 
| 1713 }  // namespace internal | 1713 }  // namespace internal | 
| 1714 }  // namespace v8 | 1714 }  // namespace v8 | 
| OLD | NEW | 
|---|