prebirth: Add `quote' form
* build-aux/bootstrap/prebirth.js (fnmap): Add `quote' form.master
parent
ea7425dc6d
commit
a5b53fedf5
|
@ -550,6 +550,14 @@ class Compiler
|
|||
const fnmap = {
|
||||
'js:console': 'console.log',
|
||||
|
||||
// fortunately ES6+ has native symbol support :)
|
||||
// we don't (yet?) need list quoting in Prebirth
|
||||
'quote': ( x, stoes ) => Array.isArray( x.value )
|
||||
? (function () { throw SyntaxError(
|
||||
"quoting lists is not yet supported; sorry!" )
|
||||
} )()
|
||||
: `Symbol.for('${stoes(x)}')`,
|
||||
|
||||
'lambda': ( [ args, ...body ], stoes, btoes ) =>
|
||||
"function(" + args.map( stoes ).join( ", " ) + "){\n" +
|
||||
btoes( body ) +
|
||||
|
|
Loading…
Reference in New Issue