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

Unified Diff: src/parser.h

Issue 27206002: Unify several checking methods between parser and pre-parser. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | 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 6c65ec3d8201494829e60d11b0612114425c1d11..79ce68b615311efa4067db2ccf4fe61704b4ff85 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -439,13 +439,6 @@ class Parser : public ParserBase {
static bool Parse(CompilationInfo* info) { return Parser(info).Parse(); }
bool Parse();
- void ReportMessageAt(Scanner::Location loc,
- const char* message,
- Vector<const char*> args = Vector<const char*>::empty());
- void ReportMessageAt(Scanner::Location loc,
- const char* message,
- Vector<Handle<String> > args);
-
private:
static const int kMaxNumFunctionLocals = 131071; // 2^17-1
@@ -562,6 +555,15 @@ class Parser : public ParserBase {
void ReportInvalidPreparseData(Handle<String> name, bool* ok);
void ReportMessage(const char* message, Vector<const char*> args);
void ReportMessage(const char* message, Vector<Handle<String> > args);
+ void ReportMessageAt(Scanner::Location location, const char* type) {
+ ReportMessageAt(location, type, Vector<const char*>::empty());
+ }
+ void ReportMessageAt(Scanner::Location loc,
+ const char* message,
+ Vector<const char*> args);
+ void ReportMessageAt(Scanner::Location loc,
+ const char* message,
+ Vector<Handle<String> > args);
void set_pre_parse_data(ScriptDataImpl *data) {
pre_parse_data_ = data;
@@ -570,8 +572,6 @@ class Parser : public ParserBase {
bool inside_with() const { return top_scope_->inside_with(); }
Scanner& scanner() { return scanner_; }
- int position() { return scanner_.location().beg_pos; }
- int peek_position() { return scanner_.peek_location().beg_pos; }
Mode mode() const { return mode_; }
ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; }
bool is_extended_mode() {
@@ -694,9 +694,6 @@ class Parser : public ParserBase {
bool CheckInOrOf(bool accept_OF, ForEachStatement::VisitMode* visit_mode);
- bool CheckContextualKeyword(Vector<const char> keyword);
- void ExpectContextualKeyword(Vector<const char> keyword, bool* ok);
-
Handle<String> LiteralString(PretenureFlag tenured) {
if (scanner().is_literal_ascii()) {
return isolate_->factory()->NewStringFromAscii(
@@ -741,9 +738,6 @@ class Parser : public ParserBase {
const char* error,
bool* ok);
- // Strict mode octal literal validation.
- void CheckOctalLiteral(int beg_pos, int end_pos, bool* ok);
-
// For harmony block scoping mode: Check if the scope has conflicting var/let
// declarations from different scopes. It covers for example
//
@@ -826,7 +820,6 @@ class Parser : public ParserBase {
CompilationInfo* info_;
friend class BlockState;
friend class FunctionState;
- friend class ObjectLiteralChecker<Parser>;
};
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698