| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return allow_harmony_arrow_functions_; | 100 return allow_harmony_arrow_functions_; |
| 101 } | 101 } |
| 102 bool allow_harmony_modules() const { return scanner()->HarmonyModules(); } | 102 bool allow_harmony_modules() const { return scanner()->HarmonyModules(); } |
| 103 bool allow_harmony_numeric_literals() const { | 103 bool allow_harmony_numeric_literals() const { |
| 104 return scanner()->HarmonyNumericLiterals(); | 104 return scanner()->HarmonyNumericLiterals(); |
| 105 } | 105 } |
| 106 bool allow_harmony_classes() const { return scanner()->HarmonyClasses(); } | 106 bool allow_harmony_classes() const { return scanner()->HarmonyClasses(); } |
| 107 bool allow_harmony_object_literals() const { | 107 bool allow_harmony_object_literals() const { |
| 108 return allow_harmony_object_literals_; | 108 return allow_harmony_object_literals_; |
| 109 } | 109 } |
| 110 bool allow_harmony_templates() const { return scanner()->HarmonyTemplates(); } | |
| 111 bool allow_harmony_sloppy() const { return allow_harmony_sloppy_; } | 110 bool allow_harmony_sloppy() const { return allow_harmony_sloppy_; } |
| 112 bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); } | 111 bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); } |
| 113 bool allow_harmony_computed_property_names() const { | 112 bool allow_harmony_computed_property_names() const { |
| 114 return allow_harmony_computed_property_names_; | 113 return allow_harmony_computed_property_names_; |
| 115 } | 114 } |
| 116 bool allow_harmony_rest_params() const { | 115 bool allow_harmony_rest_params() const { |
| 117 return allow_harmony_rest_params_; | 116 return allow_harmony_rest_params_; |
| 118 } | 117 } |
| 119 | 118 |
| 120 bool allow_strong_mode() const { return allow_strong_mode_; } | 119 bool allow_strong_mode() const { return allow_strong_mode_; } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 131 } | 130 } |
| 132 void set_allow_harmony_numeric_literals(bool allow) { | 131 void set_allow_harmony_numeric_literals(bool allow) { |
| 133 scanner()->SetHarmonyNumericLiterals(allow); | 132 scanner()->SetHarmonyNumericLiterals(allow); |
| 134 } | 133 } |
| 135 void set_allow_harmony_classes(bool allow) { | 134 void set_allow_harmony_classes(bool allow) { |
| 136 scanner()->SetHarmonyClasses(allow); | 135 scanner()->SetHarmonyClasses(allow); |
| 137 } | 136 } |
| 138 void set_allow_harmony_object_literals(bool allow) { | 137 void set_allow_harmony_object_literals(bool allow) { |
| 139 allow_harmony_object_literals_ = allow; | 138 allow_harmony_object_literals_ = allow; |
| 140 } | 139 } |
| 141 void set_allow_harmony_templates(bool allow) { | |
| 142 scanner()->SetHarmonyTemplates(allow); | |
| 143 } | |
| 144 void set_allow_harmony_sloppy(bool allow) { | 140 void set_allow_harmony_sloppy(bool allow) { |
| 145 allow_harmony_sloppy_ = allow; | 141 allow_harmony_sloppy_ = allow; |
| 146 } | 142 } |
| 147 void set_allow_harmony_unicode(bool allow) { | 143 void set_allow_harmony_unicode(bool allow) { |
| 148 scanner()->SetHarmonyUnicode(allow); | 144 scanner()->SetHarmonyUnicode(allow); |
| 149 } | 145 } |
| 150 void set_allow_harmony_computed_property_names(bool allow) { | 146 void set_allow_harmony_computed_property_names(bool allow) { |
| 151 allow_harmony_computed_property_names_ = allow; | 147 allow_harmony_computed_property_names_ = allow; |
| 152 } | 148 } |
| 153 void set_allow_harmony_rest_params(bool allow) { | 149 void set_allow_harmony_rest_params(bool allow) { |
| (...skipping 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3167 *ok = false; | 3163 *ok = false; |
| 3168 return; | 3164 return; |
| 3169 } | 3165 } |
| 3170 has_seen_constructor_ = true; | 3166 has_seen_constructor_ = true; |
| 3171 return; | 3167 return; |
| 3172 } | 3168 } |
| 3173 } | 3169 } |
| 3174 } } // v8::internal | 3170 } } // v8::internal |
| 3175 | 3171 |
| 3176 #endif // V8_PREPARSER_H | 3172 #endif // V8_PREPARSER_H |
| OLD | NEW |