-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Parse more UnparsedLiterals, but only if they're actually meaningful #4776
Merged
TheLimeGlass
merged 7 commits into
SkriptLang:master
from
TPGamesNL:fix/unparsedliterals
Jun 30, 2022
Merged
Parse more UnparsedLiterals, but only if they're actually meaningful #4776
TheLimeGlass
merged 7 commits into
SkriptLang:master
from
TPGamesNL:fix/unparsedliterals
Jun 30, 2022
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
APickledWalrus
approved these changes
Jun 19, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
I'm going to do some additional testing as well (with this & other related fixes)
…ional range was not set.
Fix visual effects range
Did a few tests and it avoids the conflict issues people have been reporting. |
AyhamAl-Ali
pushed a commit
to AyhamAl-Ali/Skript
that referenced
this pull request
Jul 4, 2022
…kriptLang#4776) * Parse more UnparsedLiterals, but only if they're actually meaningful * Fix visual effects not being visible further than 1 block away if optional range was not set. * Fix server startup issue 1.19 (SkriptLang#4849)
bilektugrul
added a commit
to bilektugrul/Skript
that referenced
this pull request
Jul 29, 2022
…ningful (SkriptLang#4776)" This reverts commit c6bfd66.
bilektugrul
added a commit
to bilektugrul/Skript
that referenced
this pull request
Jul 29, 2022
…ally meaningful (SkriptLang#4776)"" This reverts commit 2c6ab9a.
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.
Description
The change made in #4242 made it so that parseSingleExpr (with
allowUnparsedLiteral
false) would still return a parsed literal if the given type isObject.class
.This is a problem, because if there is a literal conflict (e.g.
end crystal
is a material and a heal reason) this means it chooses an arbitrary literal. Normally, these value conflicts are solved by returning an UnparsedLiteral which is later parsed by the syntax element into the right type. If it chooses a random value, this is no longer possible (well it technically is if you look at CondCompare#reparseLiteral, but this isn't preferred).This fix reverts the aforementioned PR, and fixes the issues that PR was fixing differently: current fix allows for more UnparsedLiteral returns, but only if the unparsed text can actually be parsed into a literal.
Target Minecraft Versions: any
Requirements: none
Related Issues:
Related PRs: