-
-
Notifications
You must be signed in to change notification settings - Fork 403
Split ExprSpecialNumber into separate literals, make 'value' optional #7965
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
Merged
APickledWalrus
merged 5 commits into
SkriptLang:dev/feature
from
sovdeeth:feature/remove-inf-value
Jul 1, 2025
Merged
Split ExprSpecialNumber into separate literals, make 'value' optional #7965
APickledWalrus
merged 5 commits into
SkriptLang:dev/feature
from
sovdeeth:feature/remove-inf-value
Jul 1, 2025
Conversation
This file contains hidden or 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
Efnilite
approved these changes
Jun 20, 2025
Absolutionism
approved these changes
Jun 20, 2025
erenkarakal
approved these changes
Jun 21, 2025
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.
infinity value
sounds fine but value of infinity
sounds a bit weird. maybe im too sleepy
removed breaking changes by enforcing |
Burbulinis
pushed a commit
to Burbulinis/Skript
that referenced
this pull request
Jul 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
completed
The issue has been fully resolved and the change will be in the next Skript update.
enhancement
Feature request, an issue about something that could be improved, or a PR improving something.
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.
Problem
ExprSpecialNumber made it a bit confusing to figure out that infinity/NaN values were present, wasn't a literal, and enforced the usage of
value
in every pattern, which was irritating.infinity
should be just as valid asinfinity value
.Solution
Replaces ExprSpecialNumber with three literals, LitInfinity, LitNegativeInfinity, and LitNaN. There didn't seem to be a nice reliable method to make a single literal have pattern-dependent values. It would be fine to have the value determined in init in most cases, but since every other literal doesn't require init to be called, it seemed unwise to rely on that.
The
x value
patterns have been replaced withx [value]
and thenegative
andpositive
were added as prefixes for infinity.Testing Completed
Existing tests suffice.
Supporting Information
In cases with no context, like
set {a} to infinity
, this changes behavior from using the infinity enchant to the value of infinity. Given that the enchant can also be referenced byinfinity 1
, I don't think this is a big issue. However, it's likely a lot more people use the enchant than the value, so we may want to explicitly maintain this behavior and allowpositive infinity [value]
andinfinity value
as the patterns.Completes: none
Related: none