1
#| syntax-funs.jl -- syntax expansion functions
3
$Id: syntax-funs.jl,v 1.1 2000/07/29 10:46:09 john Exp $
5
Copyright (C) 2000 John Harper <john@dcs.warwick.ac.uk>
7
This file is part of librep.
9
librep is free software; you can redistribute it and/or modify it
10
under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 2, or (at your option)
14
librep is distributed in the hope that it will be useful, but
15
WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
19
You should have received a copy of the GNU General Public License
20
along with Jade; see the file COPYING. If not, write to
21
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24
(define-structure unscheme.syntax-funs
42
(access unscheme.data))
46
(define (expand-if test consequent . alternative)
47
(cond ((cdr alternative)
48
(error "Scheme `if' only takes one else form"))
50
`(\#cond (,test ,consequent)
51
('t ,(car alternative))))
52
(t `(\#cond (,test ,consequent))))))