We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cca893 commit 0e7758eCopy full SHA for 0e7758e
1 file changed
lib/source/pl/core/lexer.cpp
@@ -305,10 +305,11 @@ namespace pl::core {
305
g_lexerStaticInitDone = true;
306
initNewLexer();
307
}
308
+ m_longestLineLength = 0;
309
310
311
void Lexer::reset() {
- this->m_longestLineLength = 0;
312
313
this->m_tokens.clear();
314
315
@@ -538,6 +539,10 @@ namespace pl::core {
538
539
#endif
540
541
542
+ std::size_t len = results.first - lineStart;
543
+ m_longestLineLength = std::max(len, m_longestLineLength);
544
+ lineStart = results.second;
545
+
546
const auto &eop = tkn::Separator::EndOfProgram;
547
m_tokens.emplace_back(eop.type, eop.value, location());
548
0 commit comments