Commit ab943ce5 authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

[cleanup] Enforce end_token type in ParseStatementList

Change-Id: I1e386dd23e8e485c670cd31a09ceffe6a75e26c8
Reviewed-on: https://chromium-review.googlesource.com/869115Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50633}
parent 1607614a
......@@ -1201,14 +1201,15 @@ class ParserBase {
// by value. The method is expected to add the parsed statements to the
// list. This works because in the case of the parser, StatementListT is
// a pointer whereas the preparser does not really modify the body.
V8_INLINE void ParseStatementList(StatementListT body, int end_token,
V8_INLINE void ParseStatementList(StatementListT body, Token::Value end_token,
bool* ok) {
LazyParsingResult result = ParseStatementList(body, end_token, false, ok);
USE(result);
DCHECK_EQ(result, kLazyParsingComplete);
}
LazyParsingResult ParseStatementList(StatementListT body, int end_token,
bool may_abort, bool* ok);
LazyParsingResult ParseStatementList(StatementListT body,
Token::Value end_token, bool may_abort,
bool* ok);
StatementT ParseStatementListItem(bool* ok);
StatementT ParseStatement(ZoneList<const AstRawString*>* labels, bool* ok) {
return ParseStatement(labels, kDisallowLabelledFunctionStatement, ok);
......@@ -4781,8 +4782,9 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseDoExpression(
template <typename Impl>
typename ParserBase<Impl>::LazyParsingResult
ParserBase<Impl>::ParseStatementList(StatementListT body, int end_token,
bool may_abort, bool* ok) {
ParserBase<Impl>::ParseStatementList(StatementListT body,
Token::Value end_token, bool may_abort,
bool* ok) {
// StatementList ::
// (StatementListItem)* <end_token>
......
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