wu452148993 / go-mlog

Go to MLOG transpiler

Home Page:https://vilsol.github.io/go-mlog-web/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-mlog

GitHub Workflow Status GitHub release (latest SemVer) codecov CodeFactor GitHub go.mod Go version Go Reference

Go to MLOG transpiler.

Web IDE

A Web IDE is available here

Examples

There are several example programs available on the wiki.

Supports

  • Functions
  • Multiple function parameters/arguments
  • Multiple function return values
  • return from functions
  • for loops
  • if/else if/else statements
  • switch statement
  • break/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

Roadmap

  • Full variable block scoping

Planned Optimizations

  • Simple jump instructions

Design Limitations

  • Only hardcoded (translated) imports allowed
  • Single file support only
  • No recursion (more info here)

Endgame Roadmap

  • Transpilation optimizations
  • MLOG Runtime

CLI Usage

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

About

Go to MLOG transpiler

https://vilsol.github.io/go-mlog-web/

License:GNU General Public License v3.0


Languages

Language:Go 100.0%