Feature request: Store hoisting information #1603

Open
sebastienros opened this Issue Oct 26, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@sebastienros

Because it is necessary to list all hoisted declarations when evaluating a js tree (variables and first level functions), I think Program and Function declarations should store the list of statements that are visible at their levels.

In esprima.net I created a new context variable to store the declarations as parsed, and copy them to the parsed scope object (program and function declaration)

@ariya

This comment has been minimized.

Show comment
Hide comment
@ariya

ariya Nov 30, 2016

Contributor

Ideally also in the post-processing stage, see #1602.

Contributor

ariya commented Nov 30, 2016

Ideally also in the post-processing stage, see #1602.

@michaelficarra

This comment has been minimized.

Show comment
Hide comment
@michaelficarra

michaelficarra Jul 9, 2017

Contributor

This is the job of a scope analyser, not the parser. 👎

Contributor

michaelficarra commented Jul 9, 2017

This is the job of a scope analyser, not the parser. 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment