Commit cb50b0df authored by yurys's avatar yurys Committed by Commit bot

Beautify syntax error for unterminated argument list

BUG=chromium:339474
LOG=Y

Review URL: https://codereview.chromium.org/1002263004

Cr-Commit-Position: refs/heads/master@{#27205}
parent b74b0a8b
......@@ -25,6 +25,7 @@ var kMessages = {
unterminated_regexp: ["Invalid regular expression: missing /"],
unterminated_template: ["Unterminated template literal"],
unterminated_template_expr: ["Missing } in template expression"],
unterminated_arg_list: ["missing ) after argument list"],
regexp_flags: ["Cannot supply flags when constructing one RegExp from another"],
incompatible_method_receiver: ["Method ", "%0", " called on incompatible receiver ", "%1"],
multiple_defaults_in_switch: ["More than one default clause in switch statement"],
......
......@@ -2324,13 +2324,17 @@ typename Traits::Type::ExpressionList ParserBase<Traits>::ParseArguments(
*ok = false;
return this->NullExpressionList();
}
done = (peek() == Token::RPAREN);
done = (peek() != Token::COMMA);
if (!done) {
// Need {} because of the CHECK_OK_CUSTOM macro.
Expect(Token::COMMA, CHECK_OK_CUSTOM(NullExpressionList));
Next();
}
}
Expect(Token::RPAREN, CHECK_OK_CUSTOM(NullExpressionList));
Scanner::Location location = scanner_->location();
if (Token::RPAREN != Next()) {
ReportMessageAt(location, "unterminated_arg_list");
*ok = false;
return this->NullExpressionList();
}
return result;
}
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
$(document).ready(function() {
$("html").load( "https://localhost" );
}
# Copyright 2015 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
*%(basename)s:7: SyntaxError: missing ) after argument list
}
^
SyntaxError: missing ) after argument list
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