Add easy to use preprocessor support via pcpp

- Fixes #60
This commit is contained in:
Dustin Spicuzza
2023-08-21 17:19:23 -04:00
parent 1ba625a13b
commit 34d7b4561b
11 changed files with 149 additions and 10 deletions

View File

@@ -34,4 +34,11 @@ Parser state
.. automodule:: cxxheaderparser.parserstate
:members:
:undoc-members:
:undoc-members:
Preprocessor
------------
.. automodule:: cxxheaderparser.preprocessor
:members:
:undoc-members:

View File

@@ -10,10 +10,11 @@ A pure python C++ header parser that parses C++ headers in a mildly naive
manner that allows it to handle many C++ constructs, including many modern
(C++11 and beyond) features.
.. warning:: cxxheaderparser intentionally does not have a C preprocessor
implementation! If you are parsing code with macros in it, use
a conforming preprocessor like the pure python preprocessor
`pcpp`_ or your favorite C++ compiler.
.. warning:: cxxheaderparser intentionally does not use a C preprocessor by
default. If you are parsing code with macros in it, you need to
provide a preprocessor function in :py:class:`.ParserOptions`.
.. seealso:: :py:attr:`cxxheaderparser.options.ParserOptions.preprocessor`
.. _pcpp: https://github.com/ned14/pcpp

View File

@@ -1,3 +1,4 @@
sphinx >= 3.0
sphinx-rtd-theme
sphinx-autodoc-typehints
sphinx-autodoc-typehints
pcpp