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

Unified Diff: src/ast.cc

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 | « src/ast.h ('k') | src/compiler.cc » ('j') | src/parser.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 4edcf6d844333b712fed58036c6987f789b4eeb3..7cb5578317f627d363bd51822525cc11af313f8a 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -146,27 +146,6 @@ bool ObjectLiteral::Property::IsCompileTimeValue() {
}
-bool ObjectLiteral::IsValidJSON() {
- int length = properties()->length();
- for (int i = 0; i < length; i++) {
- Property* prop = properties()->at(i);
- if (!prop->value()->IsValidJSON())
- return false;
- }
- return true;
-}
-
-
-bool ArrayLiteral::IsValidJSON() {
- int length = values()->length();
- for (int i = 0; i < length; i++) {
- if (!values()->at(i)->IsValidJSON())
- return false;
- }
- return true;
-}
-
-
void TargetCollector::AddTarget(BreakTarget* target) {
// Add the label to the collector, but discard duplicates.
int length = targets_->length();
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | src/parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698