UMRnInside / MlogExtended

Mindustry logic with more instructions. Compiling to plain Mindustry logic IS supported. NOT A MOD.
MIT License
3 stars 0 forks source link

OR AND NOT Operation in if and jump-if #1

Open CaryCatZ opened 1 year ago

CaryCatZ commented 1 year ago

Let if statement and jump-if statement support OR(||) AND(&&) NOT(!) operation.

Expected:

if x > 12 && y < 15
    unit-control move x=@thisx y=@thisy
else
    unit-control idle
endif
UMRnInside commented 1 year ago

This requires LL(1) parsing, and sadly, I no longer maintain this.

A4-Tacks commented 10 months ago

Let if statement and jump-if statement support OR(||) AND(&&) NOT(!) operation.

Expected:

if x > 12 && y < 15
    unit-control move x=@thisx y=@thisy
else
    unit-control idle
endif

Why don't you take a look at the compiler I wrote? I believe it will be a good alternative https://github.com/A4-Tacks/mindustry_logic_bang_lang