ulambda/build-aux/bootstrap/libprebirth.js

52 lines
1.9 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

/**
* Transition library for Prebirth
*
* Copyright (C) 2017 Mike Gerwitz
*
* This file is part of Gibble.
*
* Gibble is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* THIS IS TEMPORARY CODE that will be REWRITTEN IN GIBBLE LISP ITSELF after
* a very basic bootstrap is complete. It is retained as an important
* artifact for those who wish to build Gibble from scratch without using
* another version of Gibble itself. This is called "self-hosting".
*
* For the actual Prebirth compiler before self-hosting, see `prebirth.js'
* in the same directory as this file.
*
* This library is intended to be concatenated with the compiled
* Prebirth Lisp to ease the transition by providing a set of functions that
* will Just Work™ without a Prebirth Lisp implementation. They will be
* removed as they are rewritten in Prebirth Lisp.
*
* By convention, everything is prefixed with `js:' in Prebirth (not `es:',
* because we're using JavaScript-specific features). Since
* non-alphanumeric and non-underscore characters are converted into `$',
* and all functions are prefixed with '$$' for global uniqueness, this
* results in a `$$js$' prefix in all of the functions below.
*/
/**
* Log to the console
*/
function $$js$console()
{
console.log.apply( console, arguments );
}
/** =============== end of libprebirth =============== **/