phrep

Update of "expressions"
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 5520fb58432800105569d3247d2cabbf8b6847eb
Page Name:expressions
Date: 2015-04-28 22:16:33
Original User: mario
Mimetype:text/x-markdown
Parent: 2008bd7b4e8651b68dfe4a5c3c68681a261fb33d
Content

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.