#lang scheme/base
(require
"../scat.ss"
"pattern-runtime.ss"
(for-syntax
scheme/base
"pattern-tx.ss"))
(provide
asm-reverse
with-patterns
check-opcodes
patterns
pattern-lambda)
(define-syntax (patterns stx)
(syntax-case stx ()
((_ namespace . patterns)
(asm-transforms-tx #'namespace #'patterns))))
(define-syntax (with-patterns stx)
(syntax-case stx ()
((_ namespace . patterns)
(with-asm-transforms-tx #'namespace #'patterns))))
(define-syntax (pattern-lambda stx)
(syntax-case stx ()
((_ . patterns)
(asm-lambda-tx #'patterns))))
(define-syntax (asm-reverse stx)
(syntax-case stx ()
((_ . ins)
(asm-template-tx #'ins))))
(define-syntax check-opcodes check-opcodes-tx)