#undef does not work
andresy opened this issue · comments
Hello,
when trying to parse a simple file like:
define FOOBAR
undef FOOBAR
lcpp complains about FOOBAR being redefined. I think this is because of "undefine()" calling "state:define(key, nil)". The latter checks:
"if not override and state:defined(key) then error() ..."
It might be instead:
"if value and not override and state:defined(key) then error() ..."
Cheers
Hi,
thanks! I will fix it and make a testcase for it :D
regards,
Michael
On Mon, July 1, 2013 4:18 pm, Ronan Collobert wrote:
Hello,
when trying to parse a simple file like: #define FOOBAR
#undef FOOBARlcpp complains about FOOBAR being redefined. I think this is because of
"undefine()" calling "state:define(key, nil)". The latter checks:
"if not override and state:defined(key) then error() ..."
It might be instead:"if value and not override and state:defined(key) then error() ..."
Cheers
Reply to this email directly or view it on GitHub:
#8