Util: Add error report to Lexer default case

This commit is contained in:
Riyyi
2022-06-29 14:14:09 +02:00
parent 4a7ed92519
commit 8c08b8a594
+3 -1
View File
@@ -104,7 +104,9 @@ void Lexer::analyze()
break; break;
default: default:
// Error! // Error!
printf("Invalid JSON!\n"); m_tokens->push_back({ Token::Type::None, m_line, m_column, std::string(1, peek()) });
m_job->printErrorLine(m_tokens->back(),
("unexpected character '" + std::string(1, peek()) + "'").c_str());
return; return;
break; break;
} }