Closed ChinYikMing closed 1 year ago
Can you reuse the logic between #ifdef
and #if defined
?
Do you mean use #ifdef
and #if defined
at the same time?
Do you mean use
#ifdef
and#if defined
at the same time?
I meant, to avoid code duplication for the same functionalities mentioned above.
I think some logic of #if
and #elif
can be refactored. Is it possible for next commit?
I think some logic of
#if
and#elif
can be refactored. Is it possible for next commit?
You can submit multiple functional commits in this pull request.
Thank @ChinYikMing for contributing!
Now only support simple conditional expression which is defined(...) after #if and #elif. More complex conditional expression might be supported in the future.
Refactor 'lib/c.c' to improve readability.
Also, add a simple test case to 'tests/driver.sh'