Mapents fixes

This commit is contained in:
fed 2022-10-14 20:16:10 +02:00
parent 8e55f8dc17
commit aa6108b4fe

View File

@ -26,10 +26,33 @@ namespace mapents
const auto lines = utils::string::split(source, '\n');
auto in_map_ent = false;
auto empty = false;
auto in_comment = false;
for (auto i = 0; i < lines.size(); i++)
{
const auto& line = lines[i];
auto line = lines[i];
if (line.ends_with('\r'))
{
line.pop_back();
}
if (line.starts_with("/*"))
{
in_comment = true;
continue;
}
if (line.ends_with("*/"))
{
in_comment = false;
continue;
}
if (in_comment)
{
continue;
}
if (line.starts_with("//"))
{
continue;