author | Alan Dipert
<alan@dipert.org> 2019-09-04 04:43:25 UTC |
committer | Alan Dipert
<alan@dipert.org> 2019-09-04 04:43:25 UTC |
parent | 7e8c5b8b7fc2ac6c177e1467958683ff90999e9c |
jacl-tests.js | +3 | -0 |
jacl.js | +5 | -0 |
diff --git a/jacl-tests.js b/jacl-tests.js index 67e809e..f92abb3 100644 --- a/jacl-tests.js +++ b/jacl-tests.js @@ -64,6 +64,9 @@ QUnit.test('Sharpsign', async is => { sym = await read1('#:foop '); is.strictEqual(sym.name, 'FOOP', 'uninterned sym has a name'); is.strictEqual(sym.packageName, null, 'uninterned packageName is null'); + + sym = await read1("#'foop "); + is.ok(sym instanceof Cons, "#' makes a cons"); }); QUnit.test('Conses', async is => { diff --git a/jacl.js b/jacl.js index 2c85f77..1cb5bcf 100644 --- a/jacl.js +++ b/jacl.js @@ -313,6 +313,11 @@ const readSharpsign = async stream => { return new Values(await stream.read()); case '<': throw new Error(`Illegal # char: <`); + case "'": + return new Values(Cons.listOf( + Package.intern('CL', 'FUNCTION'), + await (new Reader(stream)).read() + )); default: throw new Error(`Unknown # char: ${ch}`); }