phrep

Update of "expressions"
Login

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

Overview

Artifact ID: 2008bd7b4e8651b68dfe4a5c3c68681a261fb33d
Page Name:expressions
Date: 2015-03-19 15:55:21
Original User: mario
Mimetype:text/x-markdown
Parent: 156397bff1364e3b3707d7633cf7c103805b71d3
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.