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 new SourceFileService #3817

Closed
wants to merge 1 commit into from
Closed

Add new SourceFileService #3817

wants to merge 1 commit into from

Conversation

knutwannheden
Copy link
Contributor

@knutwannheden knutwannheden commented Dec 13, 2023

The service implements the methods computeWeight() and newVisitor(). This is then in turn used by SourceFile#getWeight() with the idea that it will automatically use a visitor that doesn't need to be adapted using TreeVisitorAdapter, which behind the scenes dynamically generates a new class.

The service implements the methods `computeWeight()` and `newVisitor()`. This is then in turn used by `SourceFile#getWeight()` with the idea that it will automatically use a visitor that doesn't need to be adapted using `TreeVisitorAdapter`, which behind the scenes generates a new class.
@knutwannheden
Copy link
Contributor Author

Closing for now.

@JLLeitschuh
Copy link
Collaborator

Use cases for services:

@knutwannheden
Copy link
Contributor Author

For control flow analysis we would likely add another dedicated service. We already have a few services, but for now we have limited this mechanism to J and extending languages. But I think it is soon time to pull this up into the core.

@JLLeitschuh Thanks for your use cases.

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

Successfully merging this pull request may close these issues.

None yet

2 participants