mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 13:27:59 +03:00
add MAPARRAY token detection
This commit is contained in:
@@ -144,10 +144,39 @@ namespace config
|
|||||||
file.get(c);
|
file.get(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (c == '[')
|
|
||||||
token.type = ARR_OPEN;
|
|
||||||
else if (c == ']')
|
else if (c == ']')
|
||||||
token.type = ARR_CLOSE;
|
{
|
||||||
|
std::streampos prev_pos = file.tellg();
|
||||||
|
file.get(c);
|
||||||
|
if (c == ']')
|
||||||
|
{
|
||||||
|
token.type = MAPARRAY_CLOSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
token.type = ARR_CLOSE;
|
||||||
|
file.seekg(prev_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (c == '[')
|
||||||
|
{
|
||||||
|
std::streampos prev_pos = file.tellg();
|
||||||
|
file.get(c);
|
||||||
|
if (c == '[')
|
||||||
|
{
|
||||||
|
token.type = MAPARRAY_OPEN;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
token.type = ARR_OPEN;
|
||||||
|
file.seekg(prev_pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/* else if (c == '[') */
|
||||||
|
/* token.type = ARR_OPEN; */
|
||||||
|
/* else if (c == ']') */
|
||||||
|
/* token.type = ARR_CLOSE; */
|
||||||
else if (c == '=')
|
else if (c == '=')
|
||||||
token.type = ASSIGN;
|
token.type = ASSIGN;
|
||||||
else if (c == '\n')
|
else if (c == '\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user