Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid macro expansion #67

Open
soumyaranjansabat opened this issue Dec 26, 2021 · 1 comment
Open

Avoid macro expansion #67

soumyaranjansabat opened this issue Dec 26, 2021 · 1 comment

Comments

@soumyaranjansabat
Copy link

How can only the #if and #else be evaluated and pre-processed and avoid macro expansion of any available macros in the code?

Tried overiridng with few PreprocessorHooks but unsuccessful. Would really appreciate some help.

Input
#define PARAM_A STD_ON
#define LOOPVAL 3

#if (PARAM_A== STD_ON)
while(iter < LOOPVAL )
{

}
#endif

Expected Output
while(iter < LOOPVAL )
{

}

Not Expected Output
while(iter < 3)
{

}

Similarly for other macro like functions etc.

@ned14
Copy link
Owner

ned14 commented Jan 21, 2022

Supply me your PreprocessorHooks implementation and I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants