0.2.0 • Published 9 years ago

lisp-to-array v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 years ago

lisp-to-array Code Climate Build Status js-standard-style

Transpiles lisp code to an array

Install

$ npm install --save lisp-to-array

or, to install it globally:

$ npm install -g lisp-to-array

Usage

io.js / node.js

var lispToArray = require("lisp-to-array");

console.log(lispToArray("(this is an \"example\" 42)"));

should output:

["this", "is", "an", ["`", "example"], 42]

global

Assuming the file test.lisp with the following content:

(do (def console (js console)) (. console "log" 42))
$ lisp-to-array test.lisp
$ lisp-to-array -o test.json test.lisp
$ lisp-to-array -e test.lisp

should output:

["do", ["def", "console", ["js", "console"]], [".", "console", ["`", "log"], 42]]

42
undefined

and should write into test.json:

["do", ["def", "console", ["js", "console"]], [".", "console", ["`", "log"], 42]]

Example

(this is an "example" 42)

compiles to:

["this", "is", "an", ["`", "example"], 42]
0.2.0

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago