Browse Source

Util: Add error report to Lexer default case

master
Riyyi 3 years ago
parent
commit
8c08b8a594
  1. 4
      src/util/json/lexer.cpp

4
src/util/json/lexer.cpp

@ -104,7 +104,9 @@ void Lexer::analyze()
break;
default:
// 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;
break;
}

Loading…
Cancel
Save