Skip to content

Commit 29d0223

Browse files
committed
StructFunction - add "returns" and "->" for return code of function
1 parent f61e9b9 commit 29d0223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/github/syst3ms/skriptparser/structures/functions/StructFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class StructFunction extends Structure {
1717
static {
1818
Parser.getMainRegistration()
1919
.newStructure(StructFunction.class, "*[:local[ ]] func[tion] <" + Functions.FUNCTION_NAME_REGEX + ">" +
20-
"\\([params:%*functionparameters%]\\)[return: \\:\\: <.+>]")
20+
"\\([params:%*functionparameters%]\\)[return: (\\:\\:|returns|-\\>) <.+>]")
2121
.setHandledContexts(FunctionContext.class)
2222
.name("Function")
2323
.description("Creates a function that can be called from other scripts.")

0 commit comments

Comments
 (0)