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

Support types other than literal string in dispatcher #675

Closed
blockninja124 opened this issue Jan 8, 2025 · 3 comments
Closed

Support types other than literal string in dispatcher #675

blockninja124 opened this issue Jan 8, 2025 · 3 comments

Comments

@blockninja124
Copy link

I encountered this issue here, and I'm really struggling to come up with any good work-arounds. A union with the boolean set to true on one, and false on the other seems to just override one another, and the dispatch doesn't even work for checking if an integer is %none (or %unknown?), or an actual number. My generator would greatly benefit from being able to use more types in a dispatch. Though for it to work, I think string literals would have to no longer work in the dispatch (so that it doesn't confuse 'true' with true). But perhaps strings could still be supported if included in quotation marks (e.g. "true" and true are seperate).

Anyway obviously I have no idea how tricky this feature would be to implement, but I wanted to suggest it here anyway in the hopes it can be a thing in the future.

@misode
Copy link
Owner

misode commented Jan 8, 2025

Thanks for creating an issue, however would you mind copying this over on the Spyglass issue tracker? (unfortunately I can't transfer this) That is where the mcdoc language and specification is being developed.

@blockninja124
Copy link
Author

Ah sorry, I wasn't sure where was best. Will do!

@blockninja124
Copy link
Author

SpyglassMC/Spyglass#1715

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

No branches or pull requests

2 participants