Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

[WIP] Refactor visiting strategy #459

Closed
wants to merge 2 commits into from
Closed

Conversation

zertosh
Copy link
Member

@zertosh zertosh commented Mar 26, 2017

This PR does away with the custom traverser, and instead adds correct node visitors to get accurate scopes (and references/definitions) for flow types. It's written for easy upstreaming into eslint-scope (see #438) if that becomes a thing. How? New node type visitors are added (look for //new), and only node type visitors were overwritten (look for //override) instead of visit* functions. There's some copy/paste from escope in the overwritten methods to clearly show where the new flow type code must go (look for <custom></custom>).

TODO:

  • Fix declare (Correct scoping, especially with declare module).
  • More scope tests.

@hzoo
Copy link
Member

hzoo commented Mar 27, 2017

fyi eslint pr is eslint/eslint#8280

@kaicataldo
Copy link
Member

Is this still something we want to do?

@zertosh zertosh closed this Jan 13, 2019
@zertosh zertosh deleted the patch-pattern-visitor branch January 13, 2019 00:06
@hzoo
Copy link
Member

hzoo commented Jan 13, 2019

and @zertosh if you have time to work on this again, I think a refactor PR sounds great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants