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- Statement labeling
goto
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
- Full variable block scoping
- MLOG Runtime
- MLOG to Go decompiler
- Nested sub-selector support
- Merged compiler and decompiler registries
- Constant string and number slices
- Simple jump instructions
- Recursive constant propagation
- Write directly to function return variable
- Write directly to function parameters before jump
- Single-reference function inlining
- Only hardcoded (translated) imports allowed
- Single file support only
- No recursion (more info here)
- Transpilation optimizations
- Support tail-recursion
Usage:
go-mlog [command]
Available Commands:
completion generate the autocompletion script for the specified shell
decompile Decompile MLOG to Go
execute Execute MLOG
help Help about any command
transpile Transpile Go to MLOG
trex Transpile Go to MLOG and execute it
typings Output typings as JSON
version Print current go-mlog version
Flags:
--colors Force log output with colors
--comment-offset int Comment offset from line start (default 60)
--comments Output comments
-h, --help help for go-mlog
--log string The log level to output (default "info")
--metrics Output source metrics after execution
--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