-
Notifications
You must be signed in to change notification settings - Fork 191
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 support for MixinExtras expressions #2274
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ain types of expression
…tion on completion
# Conflicts: # src/main/resources/messages/MinecraftDevelopment.properties
…tras-expression # Conflicts: # src/main/kotlin/platform/mixin/handlers/mixinextras/WrapOperationHandler.kt
…erface`. It's quite scuffed and often returns `Object` even when there is a suitable common interface, but what's important is that this matches the runtime logic.
Earthcomputer
force-pushed
the
mixinextras-expression
branch
from
July 9, 2024 20:11
eeb4dd5
to
c88fd70
Compare
We filter duplicates ourselves.
Make the preview text more representative of the actual completion and support array literals which were previously missing.
Also adapt to related MixinExtras changes.
Fix/llamas expressions fixes v2
# Conflicts: # build.gradle.kts # src/main/kotlin/platform/mixin/inspection/injector/InvalidInjectorMethodSignatureInspection.kt # src/main/resources/META-INF/plugin.xml # src/main/resources/messages/MinecraftDevelopment.properties
Update/expressions dev merge
LlamaLad7
approved these changes
Jul 12, 2024
# Conflicts: # src/main/kotlin/MinecraftConfigurable.kt # src/main/kotlin/MinecraftSettings.kt # src/main/resources/messages/MinecraftDevelopment.properties
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Llama's gist for a (slightly outdated) overview of what MixinExtras expressions are. Without IDE support, ME expressions would be really inconvenient to write, more so than other mixin features.
ME expression syntax is support through a custom language in IntelliJ, through the use of language injection. To make this nicer to work with, I have slightly extended the ME expression language. Definitions are prefixed with the
class
keyword, and then a boolean literal for whether they are a type or not. Expressions are surrounded withdo { ... }
. For example:would produce the following injected ME expression file:
This feature is basically done now, the only thing left is to switch away from the JitPack version of MixinExtras and use the library they'll provide for us, which will hopefully have the same interface.
Don't worry about the amount of commits, I'll squash them all on merge.