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

Side by Side Diff: src/parsing/parser-base.h

Issue 1808373003: Implement ES2015 labelled function declaration restrictions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix style 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.cc ('k') | src/parsing/preparser.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 #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
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
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698