WingedSeal / jmc

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

[BUG] cant call a function by macros #103

Open amqndin opened 5 months ago

amqndin commented 5 months 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 5 months ago

Workaround:

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

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

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