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_PARSING_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_H |
7 | 7 |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/hashmap.h" | 10 #include "src/hashmap.h" |
11 #include "src/messages.h" | 11 #include "src/messages.h" |
12 #include "src/parsing/expression-classifier.h" | 12 #include "src/parsing/expression-classifier.h" |
13 #include "src/parsing/func-name-inferrer.h" | 13 #include "src/parsing/func-name-inferrer.h" |
14 #include "src/parsing/scanner.h" | 14 #include "src/parsing/scanner.h" |
15 #include "src/parsing/token.h" | 15 #include "src/parsing/token.h" |
16 | 16 |
17 namespace v8 { | 17 namespace v8 { |
18 namespace internal { | 18 namespace internal { |
19 | 19 |
20 | 20 |
21 enum FunctionNameValidity { | 21 enum FunctionNameValidity { |
22 kFunctionNameIsStrictReserved, | 22 kFunctionNameIsStrictReserved, |
23 kSkipFunctionNameCheck, | 23 kSkipFunctionNameCheck, |
24 kFunctionNameValidityUnknown | 24 kFunctionNameValidityUnknown |
25 }; | 25 }; |
26 | 26 |
| 27 enum AllowLabelledFunctionStatement { |
| 28 kAllowLabelledFunctionStatement, |
| 29 kDisallowLabelledFunctionStatement, |
| 30 }; |
27 | 31 |
28 struct FormalParametersBase { | 32 struct FormalParametersBase { |
29 explicit FormalParametersBase(Scope* scope) : scope(scope) {} | 33 explicit FormalParametersBase(Scope* scope) : scope(scope) {} |
30 Scope* scope; | 34 Scope* scope; |
31 bool has_rest = false; | 35 bool has_rest = false; |
32 bool is_simple = true; | 36 bool is_simple = true; |
33 int materialized_literals_count = 0; | 37 int materialized_literals_count = 0; |
34 }; | 38 }; |
35 | 39 |
36 | 40 |
(...skipping 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3119 has_seen_constructor_ = true; | 3123 has_seen_constructor_ = true; |
3120 return; | 3124 return; |
3121 } | 3125 } |
3122 } | 3126 } |
3123 | 3127 |
3124 | 3128 |
3125 } // namespace internal | 3129 } // namespace internal |
3126 } // namespace v8 | 3130 } // namespace v8 |
3127 | 3131 |
3128 #endif // V8_PARSING_PARSER_BASE_H | 3132 #endif // V8_PARSING_PARSER_BASE_H |
OLD | NEW |