semantics/templates.rkt
#|
File: semantics/templates.rkt
Author: Bill Turtle (wrturtle)

Provides the dots for pyret-*sl.
|#
(module templates racket/base
  (require "../utilities.rkt")
  (require (for-syntax (only-in racket/base syntax-case identifier? #%app 
                                            syntax syntax/loc)))
  (define-syntax (dots stx)
    (syntax-case stx ()
      [name
       (#%app identifier? #'id)
       (syntax/loc stx
         (raise-pyret-error/stx
           (format "~a: expected a finished expression, but found a template"
                   (quote name))
           (syntax name)))]))
  (provide (rename-out [dots ..]
                       [dots ...]
                       [dots ....]
                       [dots .....]
                       [dots ......]))
)