Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] insert pragma into AST?

The current implementation of the ASTRewrite does not support preprocessor 
statement nodes. Try ASTRewrite.createLiteralNode(String) to create a node 
containing the sourcecode you like to add and insert this node to the AST.

Emanuel


On Friday 18 July 2008, Jimmie Eriksson wrote:
> hi
>
> I want to be able to insert a pragma (a IASTPreprocessorPragmaStatement) in
> the middle of an existing AST and then in I want to reflect the changes
> back to the sourcecode accordingly. I've searched some and found the
> ASTRewrite somewhat interesting but can't get it to work as I want. Can
> anyone give an example of how to use it or point me somewhere else?
>
> thanks in advance
>
> /Jimmie



Back to the top