Skip to content
MoonScript REPL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
bin
moor
spec
.gitignore
.travis.yml
LICENSE
Makefile
README.md
moor-v5.0-1.rockspec
moor_busted_rockspec-scm-1.rockspec
rockspecgen

README.md

#moor

Build Status

MoonScript REPL

Demo

$ moor
moor on MoonScript version 0.4.0 on Lua 5.3
> for i in *{1,2,3}
?  for j in *{4,5,6}
?   print j
?  print i
?
4
5
6
1
4
5
6
2
4
5
6
3
> class Cls
?  new: =>
?   @a = 1
?   @b = 2
?   @c = 3
?
<1>{
  __base = <2>{
    __class = <table 1>,
    __index = <table 2>
  },
  __init = <function 1>,
  __name = "Cls",
  <metatable> = {
    __call = <function 2>,
    __index = <table 2>
  }
}

yes, dump objects with inspect.

This supports tab completion with linenoise, and the history is stored to ~/.moor_history

Module

you can call REPL in your code

...
local var = 10 -- it can be referenced by the repl
local newenv = (require'moor')({}, _ENV)
local hoge = newenv.foo
...

TODO

  • repl command (needed?)

License

MIT

You can’t perform that action at this time.