Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Generating #includes programatically

Hello,

I'm currently looking into Code generation via the AST, and I want to
generate an #include statement: #include <utility>. This is needed for a
call to std::forward<T> which is used by some other code that I
generate. However, the only implementation of
IASTPreprocessorIncludeStatement is ASTInclusionStatement, which is a
package-private class inside ASTPreprocessorNode.java. Thus, I cannot
instantiate it outside of the
org.eclipse.cdt.internal.core.parser.scanner package.

What is the intended way of generating #includes (or other preprocessor
directives) and inserting them into the AST with an ASTRewrite?

Kind regards
Simon Levermann

Attachment: signature.asc
Description: OpenPGP digital signature


Back to the top