From 563dd3a5963fb34903e2e209833d66a19e691d96 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 31 Jul 2008 09:30:27 +0200 Subject: Apply the GPLv3 to all files. --- control-flow.lisp | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'control-flow.lisp') diff --git a/control-flow.lisp b/control-flow.lisp index 90176f0..c8c18cb 100644 --- a/control-flow.lisp +++ b/control-flow.lisp @@ -1,5 +1,25 @@ +;;; -*- mode: lisp; coding: utf-8 -*- +;;; Étoilisp/Mulklisp, a Common Lisp subset for the Étoilé runtime. +;;; Copyright (C) 2008 Matthias Andreas Benkard. +;;; +;;; This program is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU 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 General Public License +;;; along with this program. If not, see . + + +(in-package #:common-lisp) + (export '(identity constantly complement tagbody go block return-from - defconstant)) + defconstant prog prog*)) (defun identity (x) @@ -119,3 +139,22 @@ (progn ,@(cddr (first sections)))))) (when (eq ,return-value-sym ',end-marker) (return-from ,block-name nil))))))))) + + +(defmacro prog (bindings &body body) + ;;FIXME: declarations + (let ((declarations nil) + (body body)) + `(let ,bindings + ,@declarations + (tagbody + ,@body)))) + +(defmacro prog* (bindings &body body) + ;;FIXME: declarations + (let ((declarations nil) + (body body)) + `(let* ,bindings + ,@declarations + (tagbody + ,@body)))) -- cgit v1.2.3