[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}
This commit is contained in:
parent
e0348dc783
commit
2da571d268
@ -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
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user