Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Nymphium/moor
MoonScript REPL
https://github.com/Nymphium/moor
moonscript repl
Last synced: about 2 months ago
JSON representation
MoonScript REPL
- Host: GitHub
- URL: https://github.com/Nymphium/moor
- Owner: Nymphium
- License: mit
- Created: 2015-03-17T17:39:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T03:28:47.000Z (11 months ago)
- Last Synced: 2024-07-05T14:47:26.691Z (2 months ago)
- Topics: moonscript, repl
- Language: MoonScript
- Homepage:
- Size: 79.1 KB
- Stars: 15
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#moor
[![Build Status](https://api.travis-ci.org/Nymphium/moor.svg?branch=master)](https://travis-ci.org/Nymphium/moor)
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 = ,
__index =
},
__init = ,
__name = "Cls",
= {
__call = ,
__index =
}
}
```yes, dump objects with [inspect](https://github.com/kikito/inspect.lua).
This supports tab completion with [linenoise](https://github.com/hoelzro/lua-linenoise), and the history is stored to `~/.moor_history`
## Module
you can call REPL in your code```lua
...
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](https://github.com/Nymphium/moor/tree/master/LICENSE)