marijnh/tern — pull request #274 by sqs (2014-01-14 00:55:40+00:00)
Title: Store origin def paths on def AVals

This PR adds support for storing the path (e.g., `String.prototype.length`) for a def, in addition to its origin (`ecma5`), docstring, and URL, which are already being stored.

Currently it only sets the path on AVals constructed from a definition file, not on all AVals.

Here's why it's helpful to store the path. Suppose you have `"abc".length` somewhere in your code. Currently tern will show you the type (number), docstring, and URL. But there's no way for the user, or using tern's public API, to determine that this is `String.prototype.length`. This PR makes that possible. This information will be directly helpful to some users, and it will also help people building tools on top of tern, because the combination of the origin and that path unambigiously identifies a type in tern's naming scheme.