|Re: ExtendedVariableReference and CallHolder vs. CallExpression and MethodCallExpression [message #26218 is a reply to message #26177]
||Thu, 19 June 2008 08:29
| Alex Panchenko
Registered: July 2009
CallExpression is part of the dltk.core, but ExtendedVariableReference
and CallHolder are specific to the python.
The framework declare base classes for the AST to allow core support for
common functionality - search, outline, call & type hierarchies, etc.
In case of the CallExpression the implicit "this" parameter is usually
stored as null to the receiver. In scripting languages it is usually
impossible to distinguish instance vs static methods during parsing
phase, so it is implemented that way.
For example, the expression
and the expression
The receiver is declared as ASTNode because it is the base case in the
hierarchy. The situation with Statement/Expression is complex because
various languages have different notions of what an 'expression' and a
'statement' are. Probably we will merge this classes in the future. The
ASTNode is the most general case. The future of the AST class hierarchy
is often discussed, so this is not the "final" solution, it can (and
most probably will) be changed at some time.
Chuck Doucette wrote:
> Also, if I do try to use CallExpression instead of CallHolder (which only
> holds the arguments),
> what is the receiver - is it the object that you are operating on, i.e.
> this, whose type defines the method? In CallExpression, it is an ASTNode. I
> would have thought it would be an expression instead.
> "Chuck Doucette" <email@example.com> wrote in message
>> Your full sample editor uses ExtendedVariableReference and CallHolder,
>> but other internal code appears to use CallExpression and
>> MethodCallExpression instead.
>> Should I switch my code to be using CallExpression/MethodCallExpression
Powered by FUDForum
. Page generated in 0.01897 seconds