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 187eb06 commit 8d45659Copy full SHA for 8d45659
2 files changed
lib/include/pl/core/lexer.hpp
@@ -79,6 +79,8 @@ namespace pl::core
79
return false;
80
}
81
82
+ static constexpr int tabsize = 4;
83
+
84
std::string m_sourceCode;
85
const api::Source *m_source = nullptr;
86
std::vector<Token> m_tokens;
lib/source/pl/core/lexer.cpp
@@ -572,7 +572,7 @@ namespace pl::core
572
if (c == '\t')
573
{
574
u32 column = m_tabCompensation + (m_cursor - m_lineBegin + 1);
575
- u32 tabbedColumn = (((column - 1) / 4 + 1) * 4) + 1;
+ u32 tabbedColumn = (((column - 1) / tabsize + 1) * tabsize) + 1;
576
m_tabCompensation += tabbedColumn - column - 1;
577
++m_cursor;
578
0 commit comments