language/structs.rkt
#lang racket

(require (for-syntax syntax/parse))


#|
;; creation
(define-syntax (pypar:struct stx)
  (syntax-case stx ()
    [(kw name (fields ...))
     (begin
       (check-indent 'SLGC #'kw #'name)
       (check-indent 'SLGC #'name #'(fields ...)))
       (syntax/loc stx
         (pysem:define-struct name (fields ...)))]))

;; lookup
(define-syntax (pypar:lookup stx)
  (syntax-case stx ()
    [(kw source field)
     (identifier? #'field)
     (begin
       (check-indent 'SLGC #'source #'kw)
       (check-indent 'SLGC #'kw #'field)
       (syntax/loc stx
         (pysem:lookup source field)))]))

(provide (rename-out [pypar:struct struct]
                     [pypar:lookup lookup]))
|#