((data "quoted data" 123 4.5) (data (!@# (4.5) "(more" "data)")))and turn it into a native data structure. (See the Pike, Python and Ruby implementations for examples of native data structures.)
parseSexpr
is a function.
testString: assert(typeof parseSexpr === 'function', 'parseSexpr
is a function.');
- text: parseSexpr('(data1 data2 data3)')
should return ['data1', 'data2', 'data3']
testString: assert.deepEqual(parseSexpr(simpleSExpr), simpleSolution, "parseSexpr('(data1 data2 data3)')
should return ['data1', 'data2', 'data3']");
- text: parseSexpr('(data1 data2 data3)')
should return an array with 3 elements.
testString: assert.deepEqual(parseSexpr(basicSExpr), basicSolution, "parseSexpr('(data1 data2 data3)')
should return an array with 3 elements");
```