A subset of EDN to store Cirru source code.
[
[ "a" "b" "c d" ]
[ "e" [ "f" [ "g" ] "h" ] ]
[ "i" ]
]
npm i --save cirru-vectors-format
{write, parse} = require('cirru-vectors-format')
file = '\n[["a" ["b"]] ["c"] ["d"]]\n'
result = parser.parseProgram file
expected = ok: yes, data: [['a', ['b']], ['c'], ['d']], rest: ''
data = [["a", "b", "c d"],["e", ["f", ["g"], "h"]], ["i"]]
result = write data
expected = '\n[\n[ "a" "b" "c d" ]\n[ "e" [ "f" [ "g"] "h" ] ]\n[ "i" ]\n]\n'
cd test/
coffee write.coffee
coffee parse.coffee
cd real-demo-test
coffee two-way-check.coffee
MIT