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

Update the return function regex #5814

Merged
merged 13 commits into from
Jul 17, 2023
Merged

Conversation

ahmadmsaleem
Copy link
Contributor

@ahmadmsaleem ahmadmsaleem commented Jul 11, 2023

Description

There was a need for cleaner return functions instead of the old one, because the :: is so confusing for people who learn by looking at codes

function getScore(player: player) :: number: old
function getScore(player: player) returns number: new


Target Minecraft Versions:
any
Requirements:
Related Issues:

There was a need for cleaner return functions instead of the old one, because the :: is so confusing for people who learn by looking at codes
@ahmadmsaleem ahmadmsaleem changed the title Update StructFunction.java (retrun function regex) Update the retrun function regex Jul 11, 2023
@TheLimeGlass TheLimeGlass added enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls. labels Jul 12, 2023
@ahmadmsaleem ahmadmsaleem changed the title Update the retrun function regex Update the return function regex Jul 12, 2023
Copy link
Member

@AyhamAl-Ali AyhamAl-Ali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally like this addition, idk why we never did it?! hopfully it doesn't break anything we didn't think of.

Can you update examples to add 1 more example using this new addition.

@ahmadmsaleem
Copy link
Contributor Author

I personally like this addition, idk why we never did it?! hopfully it doesn't break anything we didn't think of.

Can you update examples to add 1 more example using this new addition.

The code for StructFunction.java and EffReturn.java have been updated with two new examples

@ahmadmsaleem
Copy link
Contributor Author

ahmadmsaleem commented Jul 14, 2023

After testing this for an hour, everything seems fine. Is there anything else I should test?

function itemTest1() returns         item:
    return itemTest2()

function itemTest2() returns item:
    return itemTest2()

function itemTest3() :: item:
    return diamond sword

ahmadmsaleem added a commit to ahmadmsaleem/IntelliSkript that referenced this pull request Jul 14, 2023
skript has added new way to return 
SkriptLang/Skript#5814
@TheLimeGlass TheLimeGlass merged commit a11a98a into SkriptLang:master Jul 17, 2023
4 checks passed
Moderocky pushed a commit to Moderocky/Skript that referenced this pull request Sep 16, 2023
NotSoDelayed pushed a commit to NotSoDelayed/Skript that referenced this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs testing Needs testing to determine current status or issue validity, or for WIP feature pulls.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants