;; mzcrypto: libcrypto bindings for PLT-scheme
;; syntax utilities
;;
;; (C) Copyright 2007,2008 Dimitris Vyzovitis <vyzo at media.mit.edu>
;;
;; mzcrypto is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as published
;; by the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; mzcrypto 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 Lesser General Public License for more details.
;;
;; You should have received a copy of the GNU Lesser General Public License
;; along with mzcrypto. If not, see <http://www.gnu.org/licenses/>.
#langscheme/base
(provide (all-defined-out))
(define (/identifierstx . args)
(datum->syntaxstx (applymake-symbolargs)))
(define (/stringx)
(cond
((string?x) x)
((symbol?x) (symbol->stringx))
((number?x) (number->stringx))
((syntax?x) (/string (syntax-ex)))
(else (error'/string))))
(define (/symbolx)
(cond
((symbol?x) x)
((string?x) (string->symbolx))
((syntax?x) (/symbol (syntax-ex)))
(else (error'/symbol))))
(define (make-symbol . args)
(string->symbol (applystring-append (map/stringargs))))