mlogjs icon indicating copy to clipboard operation
mlogjs copied to clipboard

Compile javascript into Mindustry logic code (mlog)

Results 19 mlogjs issues
Sort by recently updated
recently updated
newest added

Adds support for instructions that will be released on the game's build version 147, as well as updating existing declarations.

Closes #79. Fixes #227. Fixes #234. This pull request does not aim to provide full backwards-compatible behavior, it instead aims to provide a solid foundation for future updates that address:...

```js function func(x:number) { x = Math.floor(x) return x } print(func(Vars.ipt)) printFlush() ``` gives `The operator '=' is not defined for [1].` expected something like: ``` op floor func:smth @ipt...

bug

Hell Jean, sorry for this issue, I've really searched for an answer without success I tried (just curiosity at the begining) this code: ``` js class Car { }; ```...

Because fery few other compilers did that. Also, this requires changes on the sourcemapping format and the name handling and resolution.

enhancement
help wanted

Hello (EDIT -> See smaller test case at the bottom) This bug exists both in released and unreleased version: byte is set to mem[idx + offset] at line 4 of...

bug

Hello Some useless jumps are generated with nested if. Here is the smallest code I've found, but with large code, I saw a bunch of 7 useless jumps !! ```...

When using `print` inside indented contexts (functions, if statements, loops, etc) it is not possible to correctly format the template string without breaking the surrounding indentation: ```js function printVec({ x,...

enhancement

This is more of a suggestion than an actual request, using an intermediate representation that doesn't have as many edge cases can make optimizations more precise.

enhancement

Some macros "bind" their properties directly to mutable variables instead of copying them. ## `Memory` In the example bellow it is possible to see that the `a` memory macro refers...

bug