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 8 forks source link

Add support for multiple namespaces #25

Closed Nico314159 closed 1 year ago

Nico314159 commented 1 year ago

Use #namespace preprocessor directive in header. Example below:

#namespace mynamespace
class mynamespace {
    function test() {
        say "This'll be at mynamespace:test";
    }
}
class anotherclass {
    function test() {
        say "This'll be at currentnamespace:anotherclass/test";
    }
}
WingedSeal commented 1 year ago

Would like to change this to #override And remove #override_minecraft in the same commit So you'll now use #override minecraft and #override customnamespace instead

Change header.custom_namespaces to header.overrides or header.namespace_overrides

I can do these changes myself once I have the mood to code again lol

Nico314159 commented 1 year ago

I can do these changes myself once I have the mood to code again lol

Just did all of those for you lol, can you LGTM?

WingedSeal commented 1 year ago

lgtm