Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] purpose of "IASTNode point" arguments?

You could be right and may well give it a try.

Such a definitions could be represented as a binding for the class template or the function template. For the former the scope can be obtained via ICppClassType.getCompositeScope() for the latter the lookup can start in the enclosing scope accessible via IBinding.getScope().
Markus.
 
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Nathan Ridge
Sent: Wed, 06. 02. 2013 09:33
To: CDT Mailing List
Subject: Re: [cdt-dev] purpose of "IASTNode point" arguments?


> I think passing the definition from the outside will not work because at the point of instantiation you no longer know about the definition in which the dependent name has been used. 

It seems to me like the point of definition should be known by someone at the time of instantiation. Instantiation of dependent expressions typically happens in the context of instantiating some entity that contains the dependent expression, like a function or variable. The definition of that entity (binding) can be used as the point of definition.

Then again, I have not enumerated all the places where dependent expressions are instantiated. It could be that for some of them, the point of definition is not known. (If you know of an example, it would help).

> I have not thought about this enough, but I guess we could store these definitions in the evaluation objects.

How would we represent the definition in the evaluation? My understanding is that evaluations have to be representable in the PDOM. 
I gues that rules out AST nodes. Scopes are not currently serializable either, though that can probably be implemented. Are there other options?

Thanks,
Nate

 		 	   		  
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top