WingedSeal / jmc

A compiler for JMC (JavaScript-like Minecraft Function), a mcfunction extension language for making Minecraft Datapack
https://jmc.wingedseal.com
MIT License
62 stars 6 forks source link

[BUG] cant call a function by macros #103

Open amqndin opened 3 weeks ago

amqndin commented 3 weeks ago

Describe the bug

when trying to call any function using macros in a subdirectory it will throw an error. "expected operator"

To Reproduce

https://jmc.wingedseal.com/try-out?jmc=FAMwrgdgxgLglgewgAjAdzACgJTIN7ACQAXMQIYBOA5gM4B0CaCyAvMgESMLsDcRRAUwAeAqGBgDkFSPiKEAJFzrzM6MNhx9CAX2Ro4MABbJSlWn23BQkWIhRKuOWYQAOFOBBghMnJu2wWQA

Expected behavior

be able to call a function using macros

Desktop

Nico314159 commented 3 weeks ago

Workaround:

function uwu() {
    ::args.owo = "owo";

    execute run {
        $function "namespace:owo/$(uwu)";
    } with ::args;
}

function owo.owo() {
    printf("owo");
}