Commit 2da571d2 authored by neis's avatar neis Committed by Commit bot

[parser] Add convenient Print function for debugging.

R=rossberg@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2127833002
Cr-Commit-Position: refs/heads/master@{#37554}
parent e0348dc7
......@@ -7001,6 +7001,12 @@ Statement* ParserTraits::FinalizeForOfStatement(ForOfStatement* loop, int pos) {
return final_loop;
}
#ifdef DEBUG
void Parser::Print(AstNode* node) {
ast_value_factory()->Internalize(Isolate::Current());
node->Print(Isolate::Current());
}
#endif // DEBUG
} // namespace internal
} // namespace v8
......@@ -1117,6 +1117,10 @@ class Parser : public ParserBase<ParserTraits> {
HistogramTimer* pre_parse_timer_;
bool parsing_on_main_thread_;
#ifdef DEBUG
void Print(AstNode* node);
#endif // DEBUG
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment