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_PREPARSER_H | 5 #ifndef V8_PREPARSER_H |
6 #define V8_PREPARSER_H | 6 #define V8_PREPARSER_H |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 ALLOW_ACCESSORS(harmony_computed_property_names); | 112 ALLOW_ACCESSORS(harmony_computed_property_names); |
113 ALLOW_ACCESSORS(harmony_rest_params); | 113 ALLOW_ACCESSORS(harmony_rest_params); |
114 ALLOW_ACCESSORS(harmony_spreadcalls); | 114 ALLOW_ACCESSORS(harmony_spreadcalls); |
115 ALLOW_ACCESSORS(harmony_destructuring); | 115 ALLOW_ACCESSORS(harmony_destructuring); |
116 ALLOW_ACCESSORS(harmony_spread_arrays); | 116 ALLOW_ACCESSORS(harmony_spread_arrays); |
117 ALLOW_ACCESSORS(harmony_new_target); | 117 ALLOW_ACCESSORS(harmony_new_target); |
118 ALLOW_ACCESSORS(strong_mode); | 118 ALLOW_ACCESSORS(strong_mode); |
119 #undef ALLOW_ACCESSORS | 119 #undef ALLOW_ACCESSORS |
120 | 120 |
121 bool allow_harmony_modules() const { return scanner()->HarmonyModules(); } | 121 bool allow_harmony_modules() const { return scanner()->HarmonyModules(); } |
122 bool allow_harmony_classes() const { return scanner()->HarmonyClasses(); } | |
123 bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); } | 122 bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); } |
124 | 123 |
125 void set_allow_harmony_modules(bool a) { scanner()->SetHarmonyModules(a); } | 124 void set_allow_harmony_modules(bool a) { scanner()->SetHarmonyModules(a); } |
126 void set_allow_harmony_classes(bool a) { scanner()->SetHarmonyClasses(a); } | |
127 void set_allow_harmony_unicode(bool a) { scanner()->SetHarmonyUnicode(a); } | 125 void set_allow_harmony_unicode(bool a) { scanner()->SetHarmonyUnicode(a); } |
128 | 126 |
129 protected: | 127 protected: |
130 enum AllowRestrictedIdentifiers { | 128 enum AllowRestrictedIdentifiers { |
131 kAllowRestrictedIdentifiers, | 129 kAllowRestrictedIdentifiers, |
132 kDontAllowRestrictedIdentifiers | 130 kDontAllowRestrictedIdentifiers |
133 }; | 131 }; |
134 | 132 |
135 enum Mode { | 133 enum Mode { |
136 PARSE_LAZILY, | 134 PARSE_LAZILY, |
(...skipping 3807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3944 *ok = false; | 3942 *ok = false; |
3945 return; | 3943 return; |
3946 } | 3944 } |
3947 has_seen_constructor_ = true; | 3945 has_seen_constructor_ = true; |
3948 return; | 3946 return; |
3949 } | 3947 } |
3950 } | 3948 } |
3951 } } // v8::internal | 3949 } } // v8::internal |
3952 | 3950 |
3953 #endif // V8_PREPARSER_H | 3951 #endif // V8_PREPARSER_H |
OLD | NEW |