Commit e5cf8e37 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[scanner] Don't muck with positions of EOS in Next

They are properly initialized upon creation.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I10ac441580bf957e97ce663c9c3ad268ddeae935
Reviewed-on: https://chromium-review.googlesource.com/1188573
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55492}
parent 9d493179
......@@ -233,7 +233,6 @@ uc32 Scanner::ScanUnlimitedLengthHexNumber(int max_value, int beg_pos) {
}
Token::Value Scanner::Next() {
if (next().token == Token::EOS) next().location = current().location;
// Rotate through tokens.
TokenDesc* previous = current_;
current_ = next_;
......
......@@ -15154,7 +15154,7 @@ THREADED_TEST(TryCatchSourceInfoForEOSError) {
CHECK(v8::Script::Compile(context.local(), v8_str("!\n")).IsEmpty());
CHECK(try_catch.HasCaught());
v8::Local<v8::Message> message = try_catch.Message();
CHECK_EQ(1, message->GetLineNumber(context.local()).FromJust());
CHECK_EQ(2, message->GetLineNumber(context.local()).FromJust());
CHECK_EQ(0, message->GetStartColumn(context.local()).FromJust());
}
......
......@@ -4,7 +4,7 @@ Running test: testUnexpectedEndOfInput
Runs '+++'
Runtime.evaluate exceptionDetails:
{
columnNumber : 2
columnNumber : 3
exception : {
className : SyntaxError
description : SyntaxError: Unexpected end of input
......@@ -49,7 +49,7 @@ paused on exception:
}
Runtime.evaluate exceptionDetails:
{
columnNumber : 2
columnNumber : 3
exception : {
className : SyntaxError
description : SyntaxError: Unexpected end of input at <anonymous>:1:1
......
......@@ -6,7 +6,7 @@ compilation result:
id : <messageId>
result : {
exceptionDetails : {
columnNumber : 2
columnNumber : 3
exception : {
className : SyntaxError
description : SyntaxError: Unexpected end of input
......
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