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

Refactor ExprFilter to use new parser data API #6342

Closed
wants to merge 5 commits into from

Conversation

Pikachu920
Copy link
Member

Description

Refactors ExprFilter to use new parser data API instead of the static based method it was using before


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@Pikachu920 Pikachu920 added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jan 18, 2024
@Fusezion
Copy link
Contributor

Fusezion commented Jan 18, 2024

wasn't there something like ExprInput? that handled the inputs?

@Pikachu920
Copy link
Member Author

wasn't there something like ExprInput? that handled the inputs?

it's now a separate class, ExprFilterInput

@Fusezion
Copy link
Contributor

ohhhh I didn't realize it wasn't already

Set<ExprFilterInput<?>> dependentInputs = parentFilter.getDependentInputs();
dependentInputs.remove(this.source);
dependentInputs.add(this);

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change


}
this.types = types;
this.superType = (Class<T>) Utils.getSuperType(types);
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we want to ensure that the return type is one Skript is aware of. That is, ensure a ClassInfo exists for it.

public static ClassInfo<?> getSuperClassInfo(Class<?>... classes) {

@AyhamAl-Ali AyhamAl-Ali changed the base branch from master to dev/feature March 29, 2024 18:48
@sovdeeth
Copy link
Member

Closing as #6737 has implemented this functionality.

@sovdeeth sovdeeth closed this Jul 16, 2024
@APickledWalrus APickledWalrus deleted the enhancement/clean-up-exprfilter branch October 13, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants