mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
feat(tokenizer): parse string up to newline
This commit is contained in:
@@ -93,11 +93,13 @@ namespace config
|
|||||||
token.value = "";
|
token.value = "";
|
||||||
/* TODO: maybe do-while? */
|
/* TODO: maybe do-while? */
|
||||||
file.get(c);
|
file.get(c);
|
||||||
while (c != '"')
|
while (c != '"' && c != '\n')
|
||||||
{
|
{
|
||||||
token.value += c;
|
token.value += c;
|
||||||
file.get(c);
|
file.get(c);
|
||||||
}
|
}
|
||||||
|
if (c == '\n')
|
||||||
|
throw InvalidToken(token.value);
|
||||||
}
|
}
|
||||||
else if (c == '[' && firstToken())
|
else if (c == '[' && firstToken())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user