Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/parsing/parser.cc

Issue 1801203002: Parser: Make skipping HTML comments optional. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/scanner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-rewriter.h" 9 #include "src/ast/ast-expression-rewriter.h"
10 #include "src/ast/ast-expression-visitor.h" 10 #include "src/ast/ast-expression-visitor.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 } 757 }
758 758
759 759
760 ClassLiteral* ParserTraits::ParseClassLiteral( 760 ClassLiteral* ParserTraits::ParseClassLiteral(
761 const AstRawString* name, Scanner::Location class_name_location, 761 const AstRawString* name, Scanner::Location class_name_location,
762 bool name_is_strict_reserved, int pos, bool* ok) { 762 bool name_is_strict_reserved, int pos, bool* ok) {
763 return parser_->ParseClassLiteral(name, class_name_location, 763 return parser_->ParseClassLiteral(name, class_name_location,
764 name_is_strict_reserved, pos, ok); 764 name_is_strict_reserved, pos, ok);
765 } 765 }
766 766
767
768 Parser::Parser(ParseInfo* info) 767 Parser::Parser(ParseInfo* info)
769 : ParserBase<ParserTraits>(info->zone(), &scanner_, info->stack_limit(), 768 : ParserBase<ParserTraits>(info->zone(), &scanner_, info->stack_limit(),
770 info->extension(), info->ast_value_factory(), 769 info->extension(), info->ast_value_factory(),
771 NULL, this), 770 NULL, this),
772 scanner_(info->unicode_cache()), 771 scanner_(info->unicode_cache(), info->allow_html_comments()),
773 reusable_preparser_(NULL), 772 reusable_preparser_(NULL),
774 original_scope_(NULL), 773 original_scope_(NULL),
775 target_stack_(NULL), 774 target_stack_(NULL),
776 compile_options_(info->compile_options()), 775 compile_options_(info->compile_options()),
777 cached_parse_data_(NULL), 776 cached_parse_data_(NULL),
778 total_preparse_skipped_(0), 777 total_preparse_skipped_(0),
779 pre_parse_timer_(NULL), 778 pre_parse_timer_(NULL),
780 parsing_on_main_thread_(true) { 779 parsing_on_main_thread_(true) {
781 // Even though we were passed ParseInfo, we should not store it in 780 // Even though we were passed ParseInfo, we should not store it in
782 // Parser - this makes sure that Isolate is not accidentally accessed via 781 // Parser - this makes sure that Isolate is not accidentally accessed via
(...skipping 6092 matching lines...) Expand 10 before | Expand all | Expand 10 after
6875 try_block, target); 6874 try_block, target);
6876 final_loop = target; 6875 final_loop = target;
6877 } 6876 }
6878 6877
6879 return final_loop; 6878 return final_loop;
6880 } 6879 }
6881 6880
6882 6881
6883 } // namespace internal 6882 } // namespace internal
6884 } // namespace v8 6883 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698