on master help sign in
add language support table to readme
commit721ba0ed4dc84d03b65dee905da91a26438b0e33 authormason clayton <masongclayton@gmail.com> dateFri 22 Feb 2019, 13:05 (8 years ago) parent62e165f
3 files changed+31−27
README.md+26−22 languages/python2/main.go+3−3 languages/python3/main.go+2−2
README.md+26−22
@@ -29,14 +29,18 @@ Usage of ./prybar-language:
2929 -q quiet
3030```
3131
32−## Supported Languages
33−* Python 2.7
34−* Python 3.x
35−* Ruby 2.5
36−* Lua 5.2
37−* TCL
38−* R
39−* Spidermonkey (javascript)
32+## Language Support
33+
34+| language | eval | eval expression | eval file | repl | repl like eval | set prompt |
35+| ------------------------- | ---- | --------------- | --------- | ---- | -------------- | ---------- |
36+| Python 2.7 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
37+| Python 3.x | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
38+| Ruby 2.5 | ✔ | ✔ | ✔ | ✔ | ✗ | ✗ |
39+| Lua 5.2 | ✔ | ✗ | ✔ | ✔ | ✗ | ✗ |
40+| Tcl | ✔ | ✔ | ✗ | ✗ | ✗ | ✗ |
41+| R | ✔ | ✗ | ✗ | ✔ | ✗ | ✗ |
42+| Javascript (spidermonkey) | ✔ | ✗ | ✗ | ✗ | ✗ | ✗ |
43+| Javascript (nodejs) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
4044
4145## Building
4246
@@ -58,21 +62,21 @@ The script `./extract.sh` can be used to compile and produce a tarball containin
5862
5963## License
6064
61− Copyright (C) 2004-2018 Neoreason, Inc. et al.
65+Copyright (C) 2004-2018 Neoreason, Inc. et al.
6266
63− This program is free software; you can redistribute it and/or
64− modify it under the terms of the GNU General Public License
65− as published by the Free Software Foundation; either version 2
66− of the License, or (at your option) any later version.
67+This program is free software; you can redistribute it and/or
68+modify it under the terms of the GNU General Public License
69+as published by the Free Software Foundation; either version 2
70+of the License, or (at your option) any later version.
6771
68− This program is distributed in the hope that it will be useful,
69− but WITHOUT ANY WARRANTY; without even the implied warranty of
70− MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71− GNU General Public License for more details.
72+This program is distributed in the hope that it will be useful,
73+but WITHOUT ANY WARRANTY; without even the implied warranty of
74+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75+GNU General Public License for more details.
7276
73− You should have received a copy of the GNU General Public License
74− along with this program; if not, write to the Free Software
75− Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
77+You should have received a copy of the GNU General Public License
78+along with this program; if not, write to the Free Software
79+Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
7680
77− See the COPYING file for more information regarding the GNU General
78− Public License.
81+See the COPYING file for more information regarding the GNU General
82+Public License.
languages/python2/main.go+3−3
@@ -15,7 +15,7 @@ type Python struct{}
1515
1616func (p Python) Open() {
1717 C.Py_Initialize()
18− p.LoadModule("readline")
18+ p.loadModule("readline")
1919 p.Eval("import signal")
2020 p.Eval("signal.signal(signal.SIGINT, signal.default_int_handler)")
2121}
@@ -60,14 +60,14 @@ func (p Python) REPLLikeEval(code string) {
6060 C.pry_eval(ccode, C.Py_single_input)
6161}
6262
63−func (p Python) LoadModule(mod string) {
63+func (p Python) loadModule(mod string) {
6464 cmode := C.CString(mod)
6565 defer C.free(unsafe.Pointer(cmode))
6666 C.PyImport_ImportModule(cmode)
6767}
6868
6969func (p Python) REPL() {
70− p.LoadModule("readline")
70+ p.loadModule("readline")
7171
7272 fn := C.CString("<stdin>")
7373 defer C.free(unsafe.Pointer(fn))
languages/python3/main.go+2−2
@@ -16,7 +16,7 @@ type Python struct{}
1616
1717func (p Python) Open() {
1818 C.Py_Initialize()
19− p.LoadModule("readline")
19+ p.loadModule("readline")
2020 p.Eval("import signal")
2121 p.Eval("signal.signal(signal.SIGINT, signal.default_int_handler)")
2222}
@@ -61,7 +61,7 @@ func (p Python) REPLLikeEval(code string) {
6161 C.pry_eval(ccode, C.Py_single_input)
6262}
6363
64−func (p Python) LoadModule(mod string) {
64+func (p Python) loadModule(mod string) {
6565 cmode := C.CString(mod)
6666 defer C.free(unsafe.Pointer(cmode))
6767 C.PyImport_ImportModule(cmode)