Go to MLOG transpiler.
A Web IDE is available here
There are several example programs available on the wiki.
- Functions
- Multiple function parameters/arguments
- Multiple function return values
return
from functionsfor
loopsif
/else if
/else
statementsswitch
statementbreak
/continue
/fallthrough
statements- Binary and Unary math
- Function level variable scopes
- Contextual errors
- Tree-shaking unused functions
- Multi-pass pre/post-processing
- Stackless functions
- Comment generation including source mapping
- Sub-selector support
- Type checking
- MLOG Runtime
- Full variable block scoping
- Nested sub-selector support
- Simple jump instructions
- Only hardcoded (translated) imports allowed
- Single file support only
- No recursion (more info here)
- Transpilation optimizations
- MLOG to Go decompiler
Usage:
go-mlog transpile [flags] <program>
Flags:
-h, --help help for transpile
Global Flags:
--colors Force log output with colors
--comment-offset int Comment offset from line start (default 60)
--comments Output comments
--log string The log level to output (default "info")
--numbers Output line numbers
--output string Output file. Outputs to stdout if unspecified
--source Output source code after comment
--stacked string Use a provided memory cell/bank as a stack