Handling leading "!" in #if
This commit is contained in:
parent
33269a5353
commit
01a4c6be8c
|
@ -243,6 +243,9 @@ static CppScope _if_do(Cpp * cpp, char const * str)
|
||||||
if(str == NULL)
|
if(str == NULL)
|
||||||
/* FIXME it's probably an error case instead */
|
/* FIXME it's probably an error case instead */
|
||||||
return CPP_SCOPE_NOTYET;
|
return CPP_SCOPE_NOTYET;
|
||||||
|
if(str[0] == '!')
|
||||||
|
return (_if_do(cpp, &str[1]) == CPP_SCOPE_TAKING)
|
||||||
|
? CPP_SCOPE_NOTYET : CPP_SCOPE_TAKING;
|
||||||
if(strcmp(str, "1") == 0)
|
if(strcmp(str, "1") == 0)
|
||||||
return CPP_SCOPE_TAKING;
|
return CPP_SCOPE_TAKING;
|
||||||
if(strncmp(str, "defined(", 8) == 0 && (p = strchr(str, ')')) != NULL)
|
if(strncmp(str, "defined(", 8) == 0 && (p = strchr(str, ')')) != NULL)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user