Skip to content

fix: ParserContext type to have all methods #57

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

Merged
merged 1 commit into from
Jun 8, 2025
Merged

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Jun 6, 2025

The this value inside of a node's parse() method actually has methods for every registered node type, such as this.Identifier(), this.Declaration(), etc. It's common for one node's parse() method to call another, so including all of these methods by default improves the developer experience greatly.

I also added the ability to augment ParserContext with a custom list of nodes to allow for extensions to easily add new nodes and still have good type checking.

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Jun 6, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 15494249542

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.611%

Totals Coverage Status
Change from base Build 15471406727: 0.0%
Covered Lines: 11823
Relevant Lines: 11955

💛 - Coveralls

@lumirlumir lumirlumir added this to Triage Jun 7, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Jun 7, 2025
@fasttime fasttime moved this from Needs Triage to Implementing in Triage Jun 8, 2025
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fasttime fasttime merged commit e069f6f into main Jun 8, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Jun 8, 2025
@github-actions github-actions bot mentioned this pull request Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted bug Something isn't working
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

4 participants