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" // TODO(titzer): remove this include dependency | 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency |
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 Expression* initializer; | 1013 Expression* initializer; |
1014 }; | 1014 }; |
1015 | 1015 |
1016 DeclarationParsingResult() | 1016 DeclarationParsingResult() |
1017 : declarations(4), | 1017 : declarations(4), |
1018 first_initializer_loc(Scanner::Location::invalid()), | 1018 first_initializer_loc(Scanner::Location::invalid()), |
1019 bindings_loc(Scanner::Location::invalid()) {} | 1019 bindings_loc(Scanner::Location::invalid()) {} |
1020 | 1020 |
1021 Block* BuildInitializationBlock(ZoneList<const AstRawString*>* names, | 1021 Block* BuildInitializationBlock(ZoneList<const AstRawString*>* names, |
1022 bool* ok); | 1022 bool* ok); |
1023 const AstRawString* SingleName() const; | |
1024 | 1023 |
1025 DeclarationDescriptor descriptor; | 1024 DeclarationDescriptor descriptor; |
1026 List<Declaration> declarations; | 1025 List<Declaration> declarations; |
1027 Scanner::Location first_initializer_loc; | 1026 Scanner::Location first_initializer_loc; |
1028 Scanner::Location bindings_loc; | 1027 Scanner::Location bindings_loc; |
1029 }; | 1028 }; |
1030 | 1029 |
1031 class PatternRewriter : private AstVisitor { | 1030 class PatternRewriter : private AstVisitor { |
1032 public: | 1031 public: |
1033 static void DeclareAndInitializeVariables( | 1032 static void DeclareAndInitializeVariables( |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 | 1394 |
1396 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1395 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1397 return parser_->ParseDoExpression(ok); | 1396 return parser_->ParseDoExpression(ok); |
1398 } | 1397 } |
1399 | 1398 |
1400 | 1399 |
1401 } // namespace internal | 1400 } // namespace internal |
1402 } // namespace v8 | 1401 } // namespace v8 |
1403 | 1402 |
1404 #endif // V8_PARSER_H_ | 1403 #endif // V8_PARSER_H_ |
OLD | NEW |