Preprocessor.js icon indicating copy to clipboard operation
Preprocessor.js copied to clipboard

define / ifdef

Open the-reality-engineer opened this issue 12 years ago • 4 comments

Does not seem to work:

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

the-reality-engineer avatar Jun 25 '14 13:06 the-reality-engineer

How about // #define var X=1?

tomByrer avatar Aug 22 '14 11:08 tomByrer

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).

simonseyock avatar Oct 08 '14 07:10 simonseyock

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.

dcodeIO avatar Oct 08 '14 12:10 dcodeIO

Awesome!

tomByrer avatar Oct 09 '14 05:10 tomByrer