Skip to content

arian/LISP.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Parse and run LISP code in JavaScript

Resources

Stars

Watchers

Forks

Packages

No packages published