mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:35:10 +00:00
Install rules IDK
I HATE GIT
This commit is contained in:
parent
8588a6fb5c
commit
a92e3daafa
8 changed files with 79 additions and 35 deletions
|
|
@ -49,6 +49,7 @@ CommandParse(char *cmd)
|
|||
char c = *cur;
|
||||
char *tmp;
|
||||
bool type;
|
||||
char char_type;
|
||||
switch (state)
|
||||
{
|
||||
case STATE_WHITE:
|
||||
|
|
@ -73,23 +74,24 @@ CommandParse(char *cmd)
|
|||
}
|
||||
break;
|
||||
case STATE_VALUE:
|
||||
type = c == '"';
|
||||
type = c == '"' || c == '\'';
|
||||
if (type)
|
||||
{
|
||||
char_type = c;
|
||||
cur++;
|
||||
}
|
||||
while (*cur)
|
||||
{
|
||||
char c = *cur;
|
||||
char cb[2] = { c, '\0' };
|
||||
if ((type && c == '"') || (!type && isblank(c)))
|
||||
if ((type && c == char_type) || (!type && isblank(c)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (c == '\\' && *(cur + 1) == '"')
|
||||
if (c == '\\' && *(cur + 1) == char_type)
|
||||
{
|
||||
cb[0] = '"';
|
||||
cb[0] = char_type;
|
||||
cur++;
|
||||
}
|
||||
tmp = val;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue