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

Unified Diff: src/parser.h

Issue 8306024: Make native syntax an early error in the preparser. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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/compiler.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 72561e0e3e14245135e75966cc4d7e59f853caad..914d3c7fdcab798c7652b1ff19c206070d033e54 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -33,6 +33,7 @@
#include "preparse-data-format.h"
#include "preparse-data.h"
#include "scopes.h"
+#include "preparser.h"
namespace v8 {
namespace internal {
@@ -157,6 +158,13 @@ class ScriptDataImpl : public ScriptData {
class ParserApi {
public:
+ enum Flags {
+ kNoFlags = v8::preparser::PreParser::kNoFlags,
+ kAllowLazy = v8::preparser::PreParser::kAllowLazy,
+ kAllowNativesSyntax = v8::preparser::PreParser::kAllowNativesSyntax,
+ kHarmonyScoping = kAllowNativesSyntax * 2
fschneider 2011/10/17 10:33:51 Why is there not harmony scoping flag in the prepa
Lasse Reichstein 2011/10/17 11:00:30 Not sure there is a reason. In the preparser, the
+ };
+
// Parses the source code represented by the compilation info and sets its
// function literal. Returns false (and deallocates any allocated AST
// nodes) if parsing failed.
@@ -165,13 +173,13 @@ class ParserApi {
// Generic preparser generating full preparse data.
static ScriptDataImpl* PreParse(UC16CharacterStream* source,
v8::Extension* extension,
- bool harmony_scoping);
+ int flags);
// Preparser that only does preprocessing that makes sense if only used
// immediately after.
static ScriptDataImpl* PartialPreParse(UC16CharacterStream* source,
v8::Extension* extension,
- bool harmony_scoping);
+ int flags);
};
// ----------------------------------------------------------------------------
« no previous file with comments | « src/compiler.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698