.developing preprocessor

git-svn-id: svn://ultimatepp.org/upp/trunk@8156 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-02-08 18:13:21 +00:00
parent c635cd80d2
commit 1ab3e95fb8
3 changed files with 10 additions and 7 deletions

View file

@ -250,6 +250,12 @@ String Cpp::Preprocess(Stream& in, bool needresult)
result.Cat("\n");
if(strncmp(s + 1, "define", 6) == 0)
Define(s + 7);
else
if(strncmp(s + 1, "undef", 5) == 0) {
CParser p(s + 6);
if(p.IsId())
macro.UnlinkKey(p.ReadId());
}
}
else
if(needresult)