Fix SimpleLexer not initializing read numbers property

This commit is contained in:
Jan 2021-03-13 15:47:42 +01:00
parent a84a4051f9
commit 8a227d1171

View File

@ -4,6 +4,7 @@ SimpleLexer::SimpleLexer(IParserLineStream* stream)
: AbstractLexer(stream), : AbstractLexer(stream),
m_emit_new_line_tokens(false), m_emit_new_line_tokens(false),
m_read_strings(true), m_read_strings(true),
m_read_numbers(true),
m_last_line(1) m_last_line(1)
{ {
} }
@ -27,7 +28,7 @@ SimpleParserValue SimpleLexer::GetNextToken()
{ {
PeekChar(); PeekChar();
const auto nextCharPos = GetNextCharacterPos(); const auto nextCharPos = GetNextCharacterPos();
if(m_emit_new_line_tokens && nextCharPos.m_line > m_last_line) if (m_emit_new_line_tokens && nextCharPos.m_line > m_last_line)
{ {
m_last_line++; m_last_line++;
return SimpleParserValue::NewLine(GetPreviousCharacterPos()); return SimpleParserValue::NewLine(GetPreviousCharacterPos());