Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 2831266db7a3a206e1a6d00c2fef87bdda17ad4e..aa866647d1eb99ad426b5f7e9dbd116a531edd6f 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -494,7 +494,12 @@ class ParserBase : public Traits { |
bool is_generator() const { return function_state_->is_generator(); } |
bool allow_const() { |
- return is_strict(language_mode()) || allow_legacy_const(); |
+ return is_strict(language_mode()) || allow_harmony_sloppy() || |
+ allow_legacy_const(); |
+ } |
+ |
+ bool allow_let() { |
+ return is_strict(language_mode()) || allow_harmony_sloppy(); |
} |
// Report syntax errors. |