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 more flexible static parse method #6306

Merged
merged 5 commits into from Apr 3, 2024

Conversation

Pikachu920
Copy link
Member

Description

Some addons (including skript-reflect) are using the private parse_i method reflectively. This PR adds a proper way to do the same thing.


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

@Pikachu920 Pikachu920 changed the base branch from master to dev/feature January 6, 2024 23:00
@Pikachu920 Pikachu920 added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jan 6, 2024
*/
@Nullable
public static ParseResult parse(String text, SkriptPattern pattern, int parseFlags, ParseContext parseContext) {
return parse(text, pattern.toString(), parseFlags, parseContext);
Copy link
Member Author

@Pikachu920 Pikachu920 Jan 6, 2024

Choose a reason for hiding this comment

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

the idea here is to add a SkriptPattern overload now so that if it becomes possible to parse the text more performantly with the SkriptPattern, we can change the implementation to do so! that way addon developers can start using this now with the potential of future improvements.

Copy link
Contributor

@Fusezion Fusezion left a comment

Choose a reason for hiding this comment

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

Yay stability

Copy link
Member

@AyhamAl-Ali AyhamAl-Ali left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@AyhamAl-Ali AyhamAl-Ali added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Mar 29, 2024
@Pikachu920 Pikachu920 merged commit e454a10 into dev/feature Apr 3, 2024
5 checks passed
@Pikachu920 Pikachu920 deleted the feature/parse-method-overload branch April 3, 2024 02:09
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. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants