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

Unified Diff: src/ast.h

Issue 549207: Added validating JSON parser mode to parser. (Closed)
Patch Set: Created 10 years, 11 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/ast.cc » ('j') | src/parser.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 11a12d0aa5a0294913c7cfd4fb698ab88ef8b225..48d0bfac066857f92b2f386903a157575f09fd82 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -186,7 +186,6 @@ class Expression: public AstNode {
virtual Expression* AsExpression() { return this; }
- virtual bool IsValidJSON() { return false; }
virtual bool IsValidLeftHandSide() { return false; }
// Symbols that cannot be parsed as array indices are considered property
@@ -713,8 +712,6 @@ class Literal: public Expression {
return handle_.is_identical_to(other->handle_);
}
- virtual bool IsValidJSON() { return true; }
-
virtual bool IsPropertyName() {
if (handle_->IsSymbol()) {
uint32_t ignored;
@@ -751,8 +748,6 @@ class MaterializedLiteral: public Expression {
// constants and simple object and array literals.
bool is_simple() const { return is_simple_; }
- virtual bool IsValidJSON() { return true; }
-
int depth() const { return depth_; }
private:
@@ -806,7 +801,6 @@ class ObjectLiteral: public MaterializedLiteral {
virtual ObjectLiteral* AsObjectLiteral() { return this; }
virtual void Accept(AstVisitor* v);
- virtual bool IsValidJSON();
Handle<FixedArray> constant_properties() const {
return constant_properties_;
@@ -854,7 +848,6 @@ class ArrayLiteral: public MaterializedLiteral {
virtual void Accept(AstVisitor* v);
virtual ArrayLiteral* AsArrayLiteral() { return this; }
- virtual bool IsValidJSON();
Handle<FixedArray> constant_elements() const { return constant_elements_; }
ZoneList<Expression*>* values() const { return values_; }
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698