Skip to content
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

Implement enclosing ranges #293

Closed
wants to merge 5 commits into from

Conversation

Titou325
Copy link
Contributor

@Titou325 Titou325 commented Dec 15, 2023

Implements basic enclosing_ranges for JS/TS.
The following are implemented:

  • Named arrow function declaration,
  • Function declaration,
  • Class declaration,
  • Method declaration,
  • TS Interface declaration

To facilitate snapshot handling, I rebased the current snapshot formatter on the one used for Python. These two should be put in common at a later stage.

The implementation itself is very straightforward, and I believe can easily be extended to support other features.

Related to #278

Test plan

Added the following snapshots, with their input and output. The output was visually confirmed.

  • Added enclosing-range snapshot to test JS support,
  • Added enclosing-range-ts snapshot to test TS support

@Titou325 Titou325 changed the title #278 - Implement enclosing ranges Implement enclosing ranges Dec 15, 2023
@maks-ivanov
Copy link

super glad this is being built!

@varungandhi-src
Copy link
Contributor

Apologies for missing this PR earlier, I will review this PR on Monday. For future PRs, please feel free to ping me directly.

@varungandhi-src
Copy link
Contributor

Overall, this PR looks quite good. I've broken it up into smaller PRs, and made some minor adjustments directly instead of bothering you with minor comments. There doesn't seem to be any performance degradation, so we can leave it on by default.

@varungandhi-src
Copy link
Contributor

Closing this PR as it is superseded by #308

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

Successfully merging this pull request may close these issues.

3 participants