tern icon indicating copy to clipboard operation
tern copied to clipboard

Feature request: Get the current namepath

Open notetiene opened this issue 8 years ago • 0 comments
trafficstars

I think it could be nice to get the namepath of a method/function/object definition at a given position.

The main use I see for that functionality is documentation. By updating the Emacs package (or any other text-editor), someone could copy the namepath for the current function. It would be really useful for extension documentation.

An other use could be to generate changelog entries based on what node (namepath) changed.

From what I've seen so far in acorn, it wouldn't be a big thing to record the parents of a given node. If a method/property is member of the prototype, it would be written (when getting the namepath) as a static member. However, if the prototype isn't the parent of the method, it would be an instance member.

See: http://usejsdoc.org/about-namepaths.html

notetiene avatar Dec 16 '16 01:12 notetiene