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

Supported events #7281

Open
wants to merge 12 commits into
base: dev/feature
Choose a base branch
from
Open

Conversation

Efnilite
Copy link
Member

Description

Adds a method to specify the supported events by this SyntaxElement.
If the current parser event is not supported by the SyntaxElement, prints an error.
This removes the need for these checks in inits.


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

@Efnilite Efnilite added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Dec 19, 2024
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.

not a huge fan of this given that it ties events deeper into the api, but i'd like to see what others think.

@sovdeeth
Copy link
Member

Yeah I'd rather it stay as is for now, since this should be context-aware in the future when someone cough cough gets around to context api

Copy link
Member

@Moderocky Moderocky left a comment

Choose a reason for hiding this comment

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

I think this looks ok but I want somebody more familiar with parser to approve this.

@UnderscoreTud
Copy link
Member

not a huge fan of this given that it ties events deeper into the api, but i'd like to see what others think.

If this is a big enough concern we could move the method into its own interface, maybe called EventRestrictedSyntax? Or something along those lines. Just so it's not embedded into the SyntaxElement class

@Moderocky Moderocky added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Dec 26, 2024
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.

5 participants