[cfe-dev] Parse AST several times

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Jan 2 11:28:58 PST 2013


How about reparsing with a new SourceManager, Preprocessor etc.
For example, use a new ASTUnit or CompilerInstance, depending on how you do the parsing.

On Jan 1, 2013, at 4:13 AM, madil90 <madil90 at gmail.com> wrote:

> Hi,
>   I am creating and parsing an AST. During this parsing, I am making some
> changes(using rewriter) to the file. I want to now update the AST and parse
> the AST conforming to the edited file. Unfortunately, the
> sourcemanager.createMianFileID(FileEntry) gives an error saying
> "MainFileID.isInvalid() && MainFileID already exists". How can I parse the
> AST several time, while updating the AST after each parsing.
> 
> Regards,
> Adil
> LUMS SSE
> 
> 
> 
> --
> View this message in context: http://clang-developers.42468.n3.nabble.com/Parse-AST-several-times-tp4029276.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list