Terry J. Reedy added the comment:

idlelib has two files that *might* be helpful to anyone who wants to pursue 
this: PyParse.py and HyperParser.py. One use of the latter is for calltips. 
When the user types '(', the HyperParser is used first to determine whether the 
'(' is preceded by an operator (making it a grouper) or not (making it a call 
operator). In the later case, it parses backwards to find the beginning of the 
callable expression, which is then evaluated to get the callable (if it does 
not contain an embedded call) and hence the signature. Parsing forward and back 
from a given line might be similar.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12458>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to