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

Add loc getters to Value Definition #114

Merged
merged 10 commits into from
Apr 24, 2024

Conversation

nachiket87
Copy link
Contributor

@nachiket87 nachiket87 commented Apr 16, 2024

Hey @marcoroth,

Based on our discussion, I'm trying to add the various Loc's as getters on ValueDefinition. Here is a draft for you to see what I'm doing. The TypeLoc getter seems to be challenging as the this.node value of the valuedefinition can have various different syntaxes and we would have to filter through ObjectExpression type or Literal types.

@nachiket87 nachiket87 marked this pull request as draft April 16, 2024 16:50
@nachiket87 nachiket87 force-pushed the add-getters-to-value-definition branch from 5386352 to b698054 Compare April 16, 2024 16:51
@nachiket87 nachiket87 force-pushed the add-getters-to-value-definition branch from 2b2814b to b4ef719 Compare April 16, 2024 18:19
@marcoroth
Copy link
Owner

Thanks for opening this pull request, @nachiket87!

For the TypeLoc: can we make use of the new kind property we introduced in #106 and just assume an ObjectLiteral or Literal based on the kind value?

@nachiket87 nachiket87 force-pushed the add-getters-to-value-definition branch from 432377e to 414d12f Compare April 17, 2024 17:20
@nachiket87
Copy link
Contributor Author

Thanks for opening this pull request, @nachiket87!

For the TypeLoc: can we make use of the new kind property we introduced in #106 and just assume an ObjectLiteral or Literal based on the kind value?

@marcoroth hey! I've used the kind value in the last commit.

@nachiket87 nachiket87 marked this pull request as ready for review April 18, 2024 21:17
@marcoroth
Copy link
Owner

@nachiket87 awesome thank you! Is this ready to go from your perspective?

@marcoroth marcoroth changed the title add loc getters to Value Definition Add loc getters to Value Definition Apr 22, 2024
src/util/ast.ts Outdated Show resolved Hide resolved
Copy link
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @nachiket87! 🙏🏼

@marcoroth marcoroth merged commit 70566f9 into marcoroth:main Apr 24, 2024
5 checks passed
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.

None yet

2 participants