Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Retrieve file location of new nodes in AST

CDT does not provide a model for the ast after modification, if necessary you have to create it (the AST for the
modified source) from scratch. The textual change itself is represented by the Change object, it contains the information
about where code is inserted/deleted. However, the change object does not have any links to the AST nodes.
 
Markus.


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Kos
Sent: Monday, June 21, 2010 10:16 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] Retrieve file location of new nodes in AST
Importance: Low



2010/6/21 Schorn, Markus <Markus.Schorn@xxxxxxxxxxxxx>
You cannot have file locations for ASTNodes that are not created by the parser. If you need information
about ast-nodes that you have created yourself you need to store it elsewhere.

But is there any efficient way to _retrieve_ the information where the nodes were inserted during performing the change? Or do I have to rebuild the whole AST, find that node and then retrieve its position?

Best regards,
-- Tomasz WesoĊ‚owski



Back to the top