Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

define / ifdef #11

Open
speigg opened this issue Jun 25, 2014 · 4 comments
Open

define / ifdef #11

speigg opened this issue Jun 25, 2014 · 4 comments

Comments

@speigg
Copy link

speigg commented Jun 25, 2014

Does not seem to work:

// #define var X=true
// #ifdef X
console.log('hi')
// #endif
@tomByrer
Copy link

How about // #define var X=1?

@simonseyock
Copy link

It also doesn't work with var!!!!

It seems that // #ifdef and // #ifndef only work together with the passed defines (!!!!) and that // #define ONLY works together with put!!!! That is completely not what I expected.

This really is a problem and together with the include_once issue makes this preprocessor nearly useless for me. I could emulate include_once if this would work (just like in c).

@dcodeIO
Copy link
Owner

dcodeIO commented Oct 8, 2014

Deprecation notice: Preprocessor.js has been deprecated in favor of MetaScript, a much more JavaScripty way for build time meta programming using JavaScript itself as the meta language. Check out the migration guide to get a quick impression of its merits.

@tomByrer
Copy link

tomByrer commented Oct 9, 2014

Awesome!

STAH added a commit to nashdot/Preprocessor.js that referenced this issue Jan 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants