Add a name-resolution and scope analysis for JavaScript