mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Add support for /*..*/ comments to idparse
This commit is contained in:
parent
409604ebfd
commit
7b231bc70e
1 changed files with 10 additions and 0 deletions
|
@ -109,11 +109,21 @@ skipwhite:
|
|||
com_token = _com_token->str;
|
||||
return 0;
|
||||
}
|
||||
// skip // coments
|
||||
if (data[0] == '/' && data[1] == '/') {
|
||||
while (*data && *data != '\n')
|
||||
data++;
|
||||
goto skipwhite;
|
||||
}
|
||||
// skip /*..*/ comments
|
||||
if (data[0] == '/' && data[1] == '*') {
|
||||
data += 2; // skip over the leading /*
|
||||
while (data[0] && (data[0] != '*' && data[1] != '/'))
|
||||
data++;
|
||||
if (data[0])
|
||||
data +=2; // skip over the trailing */
|
||||
goto skipwhite;
|
||||
}
|
||||
if (*data == '"') {
|
||||
data++;
|
||||
i = 0;
|
||||
|
|
Loading…
Reference in a new issue