New submission from Sven Brauch <svenbra...@googlemail.com>: Hi,
I'm writing a python language support plugin for an IDE. I'm using the AST module to get information about the loaded source code, which works pretty well. However, in some cases, the information provided by the AST is simply not sufficient to do proper highlighting (or whatever); for example, class_instance.method(argument1.arg_attribute).attribute class_instance.method( argument1. arg_attribute) . attribute and class_instance.method( argument1. \ arg_attribute) \ . attribute produce exactly the same syntax tree, making it impossible to determine where e.g. "attribute" starts and ends. Although technically obviously correct, the information that the column offset for "attribute" is "0" is quite pointless. It would really be great if there could be an additional attribute for Attribute Access nodes which tells me where the attribute access the node refers to *really* takes place, not just "column 0". :) It would be even better if there was not only an offset, but also an "end" attribute providing information on where the node ends; that'd make this module way more useful, at least for me. Thanks and best regards, Sven ---------- components: Library (Lib) messages: 124596 nosy: georg.brandl, scummos priority: normal severity: normal status: open title: ast: provide more useful range information type: feature request _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10769> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com