OLD | NEW |
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 #ifndef V8_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 void HandleSourceURLComments(); | 877 void HandleSourceURLComments(); |
878 | 878 |
879 void ThrowPendingError(); | 879 void ThrowPendingError(); |
880 | 880 |
881 TemplateLiteralState OpenTemplateLiteral(int pos); | 881 TemplateLiteralState OpenTemplateLiteral(int pos); |
882 void AddTemplateSpan(TemplateLiteralState* state, bool tail); | 882 void AddTemplateSpan(TemplateLiteralState* state, bool tail); |
883 void AddTemplateExpression(TemplateLiteralState* state, | 883 void AddTemplateExpression(TemplateLiteralState* state, |
884 Expression* expression); | 884 Expression* expression); |
885 Expression* CloseTemplateLiteral(TemplateLiteralState* state, int start, | 885 Expression* CloseTemplateLiteral(TemplateLiteralState* state, int start, |
886 Expression* tag); | 886 Expression* tag); |
887 ZoneList<Expression*>* TemplateRawStrings(const TemplateLiteral* lit); | 887 ZoneList<Expression*>* TemplateRawStrings(const TemplateLiteral* lit, |
| 888 uint32_t* hash); |
888 Scanner scanner_; | 889 Scanner scanner_; |
889 PreParser* reusable_preparser_; | 890 PreParser* reusable_preparser_; |
890 Scope* original_scope_; // for ES5 function declarations in sloppy eval | 891 Scope* original_scope_; // for ES5 function declarations in sloppy eval |
891 Target* target_stack_; // for break, continue statements | 892 Target* target_stack_; // for break, continue statements |
892 ParseData* cached_parse_data_; | 893 ParseData* cached_parse_data_; |
893 | 894 |
894 CompilationInfo* info_; | 895 CompilationInfo* info_; |
895 | 896 |
896 // Pending errors. | 897 // Pending errors. |
897 bool has_pending_error_; | 898 bool has_pending_error_; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 } | 1002 } |
1002 | 1003 |
1003 | 1004 |
1004 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, | 1005 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, |
1005 int start, Expression* tag) { | 1006 int start, Expression* tag) { |
1006 return parser_->CloseTemplateLiteral(state, start, tag); | 1007 return parser_->CloseTemplateLiteral(state, start, tag); |
1007 } | 1008 } |
1008 } } // namespace v8::internal | 1009 } } // namespace v8::internal |
1009 | 1010 |
1010 #endif // V8_PARSER_H_ | 1011 #endif // V8_PARSER_H_ |
OLD | NEW |