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

Side by Side Diff: src/parser.h

Issue 1062263002: [parser] report better errors for multiple ForBindings in ForIn/Of loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add tests for zero declarations Created 5 years, 8 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/messages.js ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')
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 #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" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, 902 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names,
903 bool* ok); 903 bool* ok);
904 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, 904 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names,
905 bool* ok); 905 bool* ok);
906 Statement* ParseNativeDeclaration(bool* ok); 906 Statement* ParseNativeDeclaration(bool* ok);
907 Block* ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok); 907 Block* ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok);
908 Block* ParseVariableStatement(VariableDeclarationContext var_context, 908 Block* ParseVariableStatement(VariableDeclarationContext var_context,
909 ZoneList<const AstRawString*>* names, 909 ZoneList<const AstRawString*>* names,
910 bool* ok); 910 bool* ok);
911 Block* ParseVariableDeclarations(VariableDeclarationContext var_context, 911 Block* ParseVariableDeclarations(VariableDeclarationContext var_context,
912 int* num_decl,
912 ZoneList<const AstRawString*>* names, 913 ZoneList<const AstRawString*>* names,
913 const AstRawString** out, 914 const AstRawString** out,
914 Scanner::Location* first_initializer_loc, 915 Scanner::Location* first_initializer_loc,
915 bool* ok); 916 Scanner::Location* bindings_loc, bool* ok);
916 Statement* ParseExpressionOrLabelledStatement( 917 Statement* ParseExpressionOrLabelledStatement(
917 ZoneList<const AstRawString*>* labels, bool* ok); 918 ZoneList<const AstRawString*>* labels, bool* ok);
918 IfStatement* ParseIfStatement(ZoneList<const AstRawString*>* labels, 919 IfStatement* ParseIfStatement(ZoneList<const AstRawString*>* labels,
919 bool* ok); 920 bool* ok);
920 Statement* ParseContinueStatement(bool* ok); 921 Statement* ParseContinueStatement(bool* ok);
921 Statement* ParseBreakStatement(ZoneList<const AstRawString*>* labels, 922 Statement* ParseBreakStatement(ZoneList<const AstRawString*>* labels,
922 bool* ok); 923 bool* ok);
923 Statement* ParseReturnStatement(bool* ok); 924 Statement* ParseReturnStatement(bool* ok);
924 Statement* ParseWithStatement(ZoneList<const AstRawString*>* labels, 925 Statement* ParseWithStatement(ZoneList<const AstRawString*>* labels,
925 bool* ok); 926 bool* ok);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1123 }
1123 1124
1124 1125
1125 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, 1126 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state,
1126 int start, Expression* tag) { 1127 int start, Expression* tag) {
1127 return parser_->CloseTemplateLiteral(state, start, tag); 1128 return parser_->CloseTemplateLiteral(state, start, tag);
1128 } 1129 }
1129 } } // namespace v8::internal 1130 } } // namespace v8::internal
1130 1131
1131 #endif // V8_PARSER_H_ 1132 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698