GrieferAtWork / tpp

Tiny PreProcessor
Other
17 stars 1 forks source link
c commandline extension extensions generic pipe preprocessor std-c tpp

tpp - Tiny PreProcessor

TPP is a tiny (single source file) C Preprocessor, meant as a low-level backend for compilers of C and C-like languages, whilst implementing pretty much all preprocessor extensions supported by other compilers, ontop of a large number of its own (tpp-specific) extensions.

Usage

TPP is designed to be used in 1 of 2 ways:

Features

Preprocessor Extensions

All extensions can be hard enabled/disabled when building tpp, or soft-enabled/disabled via #pragma extension("-fname") / #pragma extension("-fno-name") directives.

Supported extensions can be tested for with __has_known_extension("name"), and supported+enabled extensions with __has_extension("name"). In turn, __has_known_extension and __has_extension can be tested for with #ifdef.