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

Unified Diff: src/parsing/preparser.h

Issue 1567603005: Set up rewriting triggers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 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/parsing/parser-base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 006644705ac0cf8d3c5a4928eba6eecf4ac210d9..59100f1ae96869283ea632512c8120e1e3d8b4a8 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -932,6 +932,16 @@ class PreParserTraits {
void SetFunctionNameFromIdentifierRef(PreParserExpression,
PreParserExpression) {}
+ inline PreParserExpression RewriteNonPattern(
+ PreParserExpression expr, const ExpressionClassifier* classifier,
+ bool* ok);
+ inline PreParserExpression RewriteNonPatternArguments(
+ PreParserExpression args, const ExpressionClassifier* classifier,
+ bool* ok);
+ inline PreParserExpression RewriteNonPatternObjectLiteralProperty(
+ PreParserExpression property, const ExpressionClassifier* classifier,
+ bool* ok);
+
private:
PreParser* pre_parser_;
};
@@ -1113,6 +1123,30 @@ PreParserExpression PreParserTraits::ParseDoExpression(bool* ok) {
}
+PreParserExpression PreParserTraits::RewriteNonPattern(
+ PreParserExpression expr, const ExpressionClassifier* classifier,
+ bool* ok) {
+ pre_parser_->ValidateExpression(classifier, ok);
+ return expr;
+}
+
+
+PreParserExpression PreParserTraits::RewriteNonPatternArguments(
+ PreParserExpression args, const ExpressionClassifier* classifier,
+ bool* ok) {
+ pre_parser_->ValidateExpression(classifier, ok);
+ return args;
+}
+
+
+PreParserExpression PreParserTraits::RewriteNonPatternObjectLiteralProperty(
+ PreParserExpression property, const ExpressionClassifier* classifier,
+ bool* ok) {
+ pre_parser_->ValidateExpression(classifier, ok);
+ return property;
+}
+
+
PreParserStatementList PreParser::ParseEagerFunctionBody(
PreParserIdentifier function_name, int pos,
const PreParserFormalParameters& parameters, FunctionKind kind,
« no previous file with comments | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698