File: _define-syntax.scm

package info (click to toggle)
gambc 4.9.3-1.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 85,424 kB
  • sloc: ansic: 1,047,649; lisp: 243,942; perl: 19,018; sh: 6,385; makefile: 6,303; objc: 3,757; cpp: 2,143; sed: 498; java: 305; awk: 198
file content (25 lines) | stat: -rw-r--r-- 869 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;;;============================================================================

;;; File: "_define-syntax.scm"

;;; Copyright (c) 2000-2015 by Marc Feeley, All Rights Reserved.

;;;============================================================================

;; This file implements macro-define-syntax which behaves like
;; ##define-syntax but allows the expander to use the (syntax-case ...),
;; (syntax-rules ...), and (syntax ...) forms.

;;;----------------------------------------------------------------------------

(##define-syntax macro-define-syntax
  (lambda (src)
    (##include "~~lib/_syntax.scm")
    (syntax-case src ()
      ((_ id fn)
       #'(##define-syntax id
           (##lambda (##src)
             (##include "~~lib/_syntax.scm")
             (fn ##src)))))))

;;;============================================================================