MoonPlus

MoonPlus is a compiler for Moonscript written in C++.

$ luarocks install moonplus

MoonPlus is a compiler with features from Moonscript language 0.5.0 and implementing new features to make Moonscript more up to date.

Used as a Lua module

require("moonp")("main") -- require `main.mp`

local moonp = require("moonp")
print(moonp.to_lua([[
f = -> print "hello world"
f!
]],{
implicit_return_root = true,
reserve_line_number = false,
lint_global = false
}))

Used as a command line tool

> moonp -h
Usage: moonp [options|files|directories] ...

-h Print this message
-e str Execute a file or raw codes
-t path Specify where to place compiled files
-o file Write output to file
-s Use spaces in generated codes instead of tabs
-m Generate minified codes
-p Write output to standard out
-b Dump compile time (doesn't write output)
-l Write line numbers from source codes
-v Print version
-- Read from standard in, print to standard out
(Must be first and only argument)

Execute without options to enter REPL, type symbol '$'
in a single line to start/stop multi-line mode

Versions

dev-1dev338 days ago7 downloads
0.4.22-15 days ago1 download
0.4.21-15 days ago0 downloads
0.4.19-186 days ago30 downloads
0.4.16-198 days ago8 downloads
0.4.6-1163 days ago47 downloads
0.4.2-1200 days ago30 downloads
0.4.0-1228 days ago6 downloads
0.3.8-1282 days ago14 downloads
0.3.7-1294 days ago2 downloads
0.3.5-1297 days ago0 downloads
0.3.2-1310 days ago17 downloads
0.2.0-1317 days ago38 downloads
0.1.2-1336 days ago7 downloads
0.1-1338 days ago1 download

Dependencies

lua >= 5.1

Labels

Manifests