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

Unified Diff: src/preparser.h

Issue 716423002: ES6 unicode extensions, part 1. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | src/scanner.h » ('j') | src/scanner.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 8b78d46a3a0eda84af92d6ce51d2d05131dec774..c41ee1a41b0d9e0500d4611f05dfb6ad27870daa 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -102,6 +102,7 @@ class ParserBase : public Traits {
bool allow_harmony_object_literals() const {
return allow_harmony_object_literals_;
}
+ bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); }
// Setters that determine whether certain syntactical constructs are
// allowed to be parsed by this instance of the parser.
@@ -119,6 +120,9 @@ class ParserBase : public Traits {
void set_allow_harmony_object_literals(bool allow) {
allow_harmony_object_literals_ = allow;
}
+ void set_allow_harmony_unicode(bool allow) {
+ scanner()->SetHarmonyUnicode(allow);
+ }
protected:
enum AllowEvalOrArgumentsAsIdentifier {
« no previous file with comments | « src/parser.cc ('k') | src/scanner.h » ('j') | src/scanner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698