Jellycuts / Jellycuts-Issues

A public issue tracker for the Jellycuts iOS app.
23 stars 0 forks source link

Import Jelly files into other Jelly files #111

Open ActuallyTaylor opened 2 years ago

ActuallyTaylor commented 2 years ago

Transcribed from WaterMelom🍉#7377 on discord

Create the ability to import one Jelly file into another Jelly file. This would allow you to have JellyFile1 and JellyFile2 and then import JellyFile1 into JellyFile2.

JellyFile1:

func myFunction() {

}

JellyFile2:

#import JellyFile1.jelly

myFunction()
MinecraftPublisher commented 2 years ago

This could be implemented as part of the repository system and I suggest should be merged together under a group issue called Jellycuts import, I will write a complete import syntax suggestion below.

MinecraftPublisher commented 2 years ago

These are the ones that I recommend:

import JellyFile1.jelly
JellyFile1.myFunction()
import myFunction from JellyFile1.jelly
myFunction()

And these ones are suggested but not recommended.

import JellyFile1.jelly as Functions1
Functions1.myFunction()
import myFunction as func from JellyFile1.jelly
func()