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

Support for boolean operator for ifdef / ifndef #13

Open
ZeeD opened this issue Jun 16, 2015 · 1 comment
Open

Support for boolean operator for ifdef / ifndef #13

ZeeD opened this issue Jun 16, 2015 · 1 comment

Comments

@ZeeD
Copy link

ZeeD commented Jun 16, 2015

As far as I know, at the moment there is no way to enable a section of code if two or more variables are defined.

let's say I want to have a generic "DEBUG" compilation mode wich, if enabled, automatically "enable" the logs, enable some UI modifications, etc. I also want some more fine grained variables; something along the lines of ENABLE_LOGS, ENABLE_UI_NEXT etc...

At the moment I need to duplicate the code and do something like

...normal stuff...
//#ifdef DEBUG
console.log('log debug stuff');
//#endif
//#ifdef ENABLE_LOGS
console.log('log debug stuff');
//#endif
...normal stuff...

it would be neat, for me, to do something like

//#ifdef DEBUG or ENABLE_LOGS
console.log('log debug stuff');
//#endif

I have no specified sintax for the boolean combination, if "and" and "not" or "&&" and "||" or some variant are fine

@smartt
Copy link
Owner

smartt commented Jun 17, 2015

This is a good idea. I hadn't touched the code in while, but this gave me a good reason to get back in there. I'll try adding it.

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

No branches or pull requests

2 participants