phrep

expressions
Login

Phrep includes a simple expression evaluator for #if and #elif directives. It allows for most common operations:

The expression evaluation is mostly careless with types.

It's somewhat of an gimmick anyway. You don't commonly need a lot of conditions to control a build/preprocessing run (#ifdef often suffices).

The MacroExpression handler is mainly there for some crude compatibility with CPP and preprocess.py. Converting expressions into PHP evaluable code would just have been more work. Probably.