Metadata-Version: 2.1
Name: simplecpreprocessor
Version: 2.2.2
Summary: simplepreprocessor expands limited set of C preprocessor macros
Home-page: https://github.com/nanonyme/simplecpreprocessor
Author: Seppo Yli-Olli
Author-email: seppo.yli-olli@iki.fi
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: pytest>=3.6 ; extra == "test"
Requires-Dist: flake8 ; extra == "test"
Requires-Dist: pytest-cov ; extra == "test"
Requires-Dist: mock ; extra == "test"
Provides-Extra: test

# simplepreprocessor

Usage
---------

import simplecpreprocessor

There will be one function called preprocess. It can either be called with a file object or
something that looks sufficiently like a file object. See unit tests to find out what's enough
for a compatible wrapper.
Line endings are by default normalized to unix but a parameter can be given to customize this
behaviour.

Gotchas
---------

Supported macros: ifdef, ifndef, define, undef, include, else,
pragma (only "once")

If using for FFI, you may want to ignore some system headers eg for types

Limitations:
 * Multiline continuations supported but whitespace handling may not be 1:1
   with real preprocessors. Trailing whitespace is removed if before comment,
   indentation from first line is removed
 * Semi-colon handling may not be identical to real preprocessors
