-
-
Notifications
You must be signed in to change notification settings - Fork 416
Fix type-aware function parsing for functions with only optional arguments #8189
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
Absolutionism
merged 2 commits into
SkriptLang:dev/patch
from
APickledWalrus:patch/type-aware-function-parsing-fix
Sep 17, 2025
Merged
Fix type-aware function parsing for functions with only optional arguments #8189
Absolutionism
merged 2 commits into
SkriptLang:dev/patch
from
APickledWalrus:patch/type-aware-function-parsing-fix
Sep 17, 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
1 task
Efnilite
approved these changes
Sep 13, 2025
sovdeeth
approved these changes
Sep 13, 2025
sovdeeth
added a commit
that referenced
this pull request
Oct 1, 2025
* Swap reset and delete errors in EffChange (#8177) swap reset and delete errors * Fix improper grammar in update block syntax (#8072) Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> * Fix Incorrect Variable Change Queue Processing (#8182) Fix incorrect change processing order * Change registerExpression() parameter name (#8180) change parameter name * Move EvtRealTime to main thread (#8185) * Fix type-aware function parsing for functions with only optional arguments (#8189) Account for functions with all optional parameters * Properly parse exprsecs in function calls (#8199) modify section context when parsing functions * add runtime error when EffSort aborts due to null values. * catch runtime errors
erenkarakal
pushed a commit
to erenkarakal/Skript
that referenced
this pull request
Nov 26, 2025
) * Swap reset and delete errors in EffChange (SkriptLang#8177) swap reset and delete errors * Fix improper grammar in update block syntax (SkriptLang#8072) Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> * Fix Incorrect Variable Change Queue Processing (SkriptLang#8182) Fix incorrect change processing order * Change registerExpression() parameter name (SkriptLang#8180) change parameter name * Move EvtRealTime to main thread (SkriptLang#8185) * Fix type-aware function parsing for functions with only optional arguments (SkriptLang#8189) Account for functions with all optional parameters * Properly parse exprsecs in function calls (SkriptLang#8199) modify section context when parsing functions * add runtime error when EffSort aborts due to null values. * catch runtime errors
erenkarakal
pushed a commit
to erenkarakal/Skript
that referenced
this pull request
Nov 26, 2025
) * Swap reset and delete errors in EffChange (SkriptLang#8177) swap reset and delete errors * Fix improper grammar in update block syntax (SkriptLang#8072) Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> * Fix Incorrect Variable Change Queue Processing (SkriptLang#8182) Fix incorrect change processing order * Change registerExpression() parameter name (SkriptLang#8180) change parameter name * Move EvtRealTime to main thread (SkriptLang#8185) * Fix type-aware function parsing for functions with only optional arguments (SkriptLang#8189) Account for functions with all optional parameters * Properly parse exprsecs in function calls (SkriptLang#8199) modify section context when parsing functions * add runtime error when EffSort aborts due to null values. * catch runtime errors
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.
Problem
When attempting to parse function arguments, SkriptParser uses a "shortcut" to determine whether parsing the input as a single expression is necessary. Those cases were determined to be:
However, I failed to consider the case that a function might have 0 required parameters. For a function like that, with multiple parameters that are all optional, the case where that function is called with only one argument could not be parsed properly.
Solution
This is a single-character fix so that single expression parsing is also attempted for functions with 0 minimum arguments.
Testing Completed
I have implemented a regression test for this behavior. I confirmed that it failed before the fix (with the same error as the reported issue).
Supporting Information
Completes: #8187
Related: none