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

Unified Diff: src/preparser.h

Issue 7207007: Proper handling of future reserved words in strict and normal mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »
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 afd3bc347590128b3d8226ae2be1294ce025d346..9ec2e032462d04b121d90fe20d9f6b55e5028f22 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -93,16 +93,23 @@ class PreParser {
static Identifier FutureReserved() {
return Identifier(kFutureReservedIdentifier);
}
+ static Identifier FutureStrictReserved() {
+ return Identifier(kFutureStrictReservedIdentifier);
+ }
bool IsEval() { return type_ == kEvalIdentifier; }
bool IsArguments() { return type_ == kArgumentsIdentifier; }
bool IsEvalOrArguments() { return type_ >= kEvalIdentifier; }
bool IsFutureReserved() { return type_ == kFutureReservedIdentifier; }
+ bool IsFutureStrictReserved() {
+ return type_ == kFutureStrictReservedIdentifier;
+ }
bool IsValidStrictVariable() { return type_ == kUnknownIdentifier; }
private:
enum Type {
kUnknownIdentifier,
kFutureReservedIdentifier,
+ kFutureStrictReservedIdentifier,
kEvalIdentifier,
kArgumentsIdentifier
};
@@ -411,7 +418,7 @@ class PreParser {
Identifier ParseIdentifier(bool* ok);
Identifier ParseIdentifierName(bool* ok);
- Identifier ParseIdentifierOrGetOrSet(bool* is_get, bool* is_set, bool* ok);
+ Identifier ParseIdentifierNameOrGetOrSet(bool* is_get, bool* is_set, bool* ok);
// Logs the currently parsed literal as a symbol in the preparser data.
void LogSymbol();
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698