New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition to TryStatement single handler #1031

Closed
ariya opened this Issue Feb 13, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@ariya
Contributor

ariya commented Feb 13, 2015

To facilitate the transition of TryStatement from the old handlers to the new handler (see #1030), Esprima should produce both properties. Once all the major downstream tools have been ported to use the handler only, handlers can be safely removed in the next major version.

In the current master branch:

> require('./esprima').parse('try{}catch(e){}')
{ type: 'Program',
  body: 
   [ { type: 'TryStatement',
       block: [Object],
       guardedHandlers: [],
       handlers: [Object],
       finalizer: null } ] }

Once this transition step is implemented, it will look like:

> require('./esprima').parse('try{}catch(e){}')
{ type: 'Program',
  body: 
   [ { type: 'TryStatement',
       block: [Object],
       guardedHandlers: [],
       handlers: [Object],
       handler: [Object],
       finalizer: null } ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment