summaryrefslogtreecommitdiff
path: root/control-flow.lisp
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-31 09:30:27 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-31 09:30:27 +0200
commit563dd3a5963fb34903e2e209833d66a19e691d96 (patch)
treeaa0c3c75096125208e6c9a090e72f8599cc4a816 /control-flow.lisp
parentf7ee743d11dde85cff2ec73f134a240fa0e53456 (diff)
Apply the GPLv3 to all files.
Diffstat (limited to 'control-flow.lisp')
-rw-r--r--control-flow.lisp41
1 files changed, 40 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>.
+
+
+(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))))