12 lines
395 B
Racket
12 lines
395 B
Racket
#lang racket/base
|
|
(require syntax/stx)
|
|
(provide (all-defined-out))
|
|
|
|
(define (stx-cadr stx) (car (stx-cdr stx)))
|
|
(define (stx-andmap f . stx-lsts)
|
|
(apply andmap f (map syntax->list stx-lsts)))
|
|
(define (stx-flatten stxs)
|
|
(apply append (stx-map syntax->list stxs)))
|
|
(define (curly-parens? stx)
|
|
(define paren-prop (syntax-property stx 'paren-shape))
|
|
(and paren-prop (char=? #\{ paren-prop))) |