LISP.js

0.0.6 • Public • Published

LISP.js

Build Status

Parse and execute LISP code in JavaScript.

API

For parsing the code, the parse function can be used. This will return an array with all pieces.

parse('(+ 2 3)'); // ['+', 2, 3]

Executing code can be done with the exec function:

exec('(+ 3 (- 10 5))'); // 8

LISP.js in Node.js

var exec = require('LISP.js').exec;
exec('(+ 1 2)');

Install with NPM

You can install LISP.js with npm:

npm install LISP.js

or add LISP.js to your package.json dependencies:

	"dependencies": {
		"LISP.js": ">=0.0.6"
	}

LISP.js in the Browser

Building LISP.js for the browser is easy with wrapup.

make build

This command will create a JS file that will export a global LISP variable with LISP.exec() and LISP.parse().

Alternatively you could use this to have global parse and exec functions.

wrup -r parse ./parse -r exec ./exec

Readme

Keywords

none

Package Sidebar

Install

npm i LISP.js

Weekly Downloads

100

Version

0.0.6

License

none

Last publish

Collaborators

  • arian