summaryrefslogtreecommitdiff
path: root/Libraries/LibJS
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-04-05 16:50:49 +0430
committerAndreas Kling <kling@serenityos.org>2020-04-05 16:11:13 +0200
commit7b54274ac5bf6893933eb110a30bdc7d671454c5 (patch)
treeca8d222493448e76600b52b00b2f95422134e0b6 /Libraries/LibJS
parentcdb627a516ae4d84554b603450b899651e798847 (diff)
downloadserenity-7b54274ac5bf6893933eb110a30bdc7d671454c5.zip
LibJS: Report the start position of a token as its line column
Diffstat (limited to 'Libraries/LibJS')
-rw-r--r--Libraries/LibJS/Lexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Lexer.cpp b/Libraries/LibJS/Lexer.cpp
index b29bef244d..75ec759f3f 100644
--- a/Libraries/LibJS/Lexer.cpp
+++ b/Libraries/LibJS/Lexer.cpp
@@ -391,7 +391,7 @@ Token Lexer::next()
m_source.substring_view(trivia_start - 1, value_start - trivia_start),
m_source.substring_view(value_start - 1, m_position - value_start),
m_line_number,
- m_line_column);
+ m_line_column - m_position + value_start);
return m_current_token;
}