feat: newline stuff

This commit is contained in:
3lswear
2022-02-12 01:43:38 +03:00
parent 29ae04e40d
commit 783b4061c0

View File

@@ -131,7 +131,31 @@ namespace config
else if (c == '=')
token.type = ASSIGN;
else if (c == '\n')
{
token.type = NEWLINE;
std::streampos prev_pos;
file.get(c);
if (c != '\n')
{
file.seekg(-1, std::ios_base::cur);
}
else if (file.eof())
{
file.clear();
DBOUT << "cleared" <<ENDL;
}
else
{
DBOUT << "no" <<ENDL;
}
// while (c == '\n')
// file.get(c);
// if (c != '\n')
// file.seekg(-1, std::ios_base::cur);
}
else if (c == '-' || isdigit(c))
{
std::streampos prevCharPos;