Skip to content

Conversation

Absolutionism
Copy link
Contributor

@Absolutionism Absolutionism commented Aug 19, 2025

Problem

As Skript progresses further, adding more elements and patterns, ensuring minimal pattern conflictions can become increasingly harder to maintain with each new pattern added.

Solution

Adds getAllCombinations and abstract getCombinations to PatternElement to construct all possible combinations that can match.
Adds JUnit PatternConflictsTest ensuring getAllCombinations correctly operates with manual inserted patterns and combinations.
Additionally, this JUnit will go through every single registered element and it's patterns to construct all combinations, store them and check if a combination can be used for more than one element/pattern.

Testing Completed

JUnit

Supporting Information

TODO:
Some form of exclusion if only x and y then exclude as can be seen with ExprScriptsOld and ExprScripts since only one can be usable at a time due to experiment enabling.

Categorize the elements, so patterns used in Structures don't get marked as conflictions with Expressions or Effects


Completes: none
Related: none

@Absolutionism Absolutionism changed the title Dev/pattern parser PatternParser Aug 19, 2025
Copy link
Member

@Efnilite Efnilite left a comment

Choose a reason for hiding this comment

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

missing docs on all the methods. especially init should have a very clear overview of what happens. see the function rework's FunctionArgumentParser for an example

great addition 🔥

@Absolutionism Absolutionism requested a review from Efnilite August 19, 2025 16:53
@Absolutionism Absolutionism changed the title PatternParser PatternElement Combinations + Conflicts Test Aug 20, 2025
@Absolutionism Absolutionism requested a review from Efnilite August 20, 2025 00:12
@Absolutionism Absolutionism marked this pull request as ready for review August 20, 2025 00:12
@Absolutionism Absolutionism requested review from a team as code owners August 20, 2025 00:12
@Absolutionism Absolutionism requested review from UnderscoreTud and removed request for a team August 20, 2025 00:12
@Absolutionism Absolutionism added enhancement Feature request, an issue about something that could be improved, or a PR improving something. unit testing For issues/PRs related to the Skript unit testing system. needs reviews A PR that needs additional reviews labels Aug 20, 2025
@Absolutionism Absolutionism moved this to In Review in 2.13 Releases Aug 20, 2025
@Absolutionism Absolutionism requested a review from sovdeeth August 20, 2025 20:10
@Absolutionism Absolutionism requested a review from sovdeeth August 21, 2025 11:34
@Absolutionism Absolutionism requested a review from sovdeeth August 21, 2025 18:51
@Absolutionism Absolutionism requested a review from Efnilite August 23, 2025 12:43
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

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

Just about ready

@skriptlang-automation skriptlang-automation bot removed the needs reviews A PR that needs additional reviews label Sep 9, 2025
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. unit testing For issues/PRs related to the Skript unit testing system.
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants