Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Myhlamaeus/lisp-to-array

Repository files navigation

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]

About

Transpiles lisp code to an array

Resources

License

Stars

Watchers

Forks

Packages

No packages published