| 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 #ifndef V8_PARSING_SCANNER_H_ | 7 #ifndef V8_PARSING_SCANNER_H_ |
| 8 #define V8_PARSING_SCANNER_H_ | 8 #define V8_PARSING_SCANNER_H_ |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 found_html_comment_ = false; | 527 found_html_comment_ = false; |
| 528 scanner_error_ = MessageTemplate::kNone; | 528 scanner_error_ = MessageTemplate::kNone; |
| 529 } | 529 } |
| 530 | 530 |
| 531 // Support BookmarkScope functionality. | 531 // Support BookmarkScope functionality. |
| 532 bool SetBookmark(); | 532 bool SetBookmark(); |
| 533 void ResetToBookmark(); | 533 void ResetToBookmark(); |
| 534 bool BookmarkHasBeenSet(); | 534 bool BookmarkHasBeenSet(); |
| 535 bool BookmarkHasBeenReset(); | 535 bool BookmarkHasBeenReset(); |
| 536 void DropBookmark(); | 536 void DropBookmark(); |
| 537 void CopyToNextTokenDesc(TokenDesc* from); |
| 537 static void CopyTokenDesc(TokenDesc* to, TokenDesc* from); | 538 static void CopyTokenDesc(TokenDesc* to, TokenDesc* from); |
| 538 | 539 |
| 539 void ReportScannerError(const Location& location, | 540 void ReportScannerError(const Location& location, |
| 540 MessageTemplate::Template error) { | 541 MessageTemplate::Template error) { |
| 541 if (has_error()) return; | 542 if (has_error()) return; |
| 542 scanner_error_ = error; | 543 scanner_error_ = error; |
| 543 scanner_error_location_ = location; | 544 scanner_error_location_ = location; |
| 544 } | 545 } |
| 545 | 546 |
| 546 void ReportScannerError(int pos, MessageTemplate::Template error) { | 547 void ReportScannerError(int pos, MessageTemplate::Template error) { |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 bool found_html_comment_; | 844 bool found_html_comment_; |
| 844 | 845 |
| 845 MessageTemplate::Template scanner_error_; | 846 MessageTemplate::Template scanner_error_; |
| 846 Location scanner_error_location_; | 847 Location scanner_error_location_; |
| 847 }; | 848 }; |
| 848 | 849 |
| 849 } // namespace internal | 850 } // namespace internal |
| 850 } // namespace v8 | 851 } // namespace v8 |
| 851 | 852 |
| 852 #endif // V8_PARSING_SCANNER_H_ | 853 #endif // V8_PARSING_SCANNER_H_ |
| OLD | NEW |