When I did that, I used GNU m4 for this. Maybe it'll help in your case as well.

Using GCC preprocessor isn't a bad thing either, but it'll have to be 
fine-tuned to do that. 


28.10.2014, 17:26, "Kevin Ingwersen (Ingwie Phoenix)" 
<[email protected]>:
> I am currently looking into using oj, a Objective-C like syntax for JS. Why I 
> didn’t use Objective-J? Its not nodejs-friendly.
>
> But oj lacks a preprocessor…but I need one. Actually, I only need one thing: 
> #include.
>
> I went and browsed npm, but I only found one preprocessor, but it required 
> slashes - which does not look very clean to me. The one I found wanted me to 
> do:
>
> // #ifdef A
> …
> // #endif
>
> I just want do something like
>
> #include <file>
>
> or
>
> #ifdef A
> …
> #endif
>
> If I can’t find one, I’ll just write my own…but it’s a bit sad.
>
> Does anyone know a proper, javascript-based preprocessor? I want to use it in 
> a middleware and preprocess the file, before giving it to oj.
>
> Kind regards, Ingwie
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules: 
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/nodejs/A3D61862-4B72-4487-9C99-D7DED8ED923E%40googlemail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/1552121414512351%40web6m.yandex.ru.
For more options, visit https://groups.google.com/d/optout.

Reply via email to