Use kernel-form-identifier-list and module-begin context for local-expand
This commit is contained in:
parent
f52ba70b98
commit
0a98061005
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require (for-syntax racket/base))
|
(require (for-syntax racket/base syntax/kerncase))
|
||||||
|
|
||||||
(require racket/match)
|
(require racket/match)
|
||||||
(require "main.rkt")
|
(require "main.rkt")
|
||||||
|
@ -25,20 +25,8 @@
|
||||||
;;(pretty-print (syntax->datum final-stx))
|
;;(pretty-print (syntax->datum final-stx))
|
||||||
final-stx)
|
final-stx)
|
||||||
(syntax-case (local-expand (car forms)
|
(syntax-case (local-expand (car forms)
|
||||||
'module
|
'module-begin
|
||||||
(syntax->list #'(quote
|
(kernel-form-identifier-list)) ()
|
||||||
quote-syntax #%top
|
|
||||||
lambda case-lambda
|
|
||||||
let-values letrec-values
|
|
||||||
begin begin0 set!
|
|
||||||
with-continuation-mark
|
|
||||||
if #%app #%expression
|
|
||||||
define-values define-syntaxes
|
|
||||||
begin-for-syntax
|
|
||||||
module module*
|
|
||||||
#%module-begin
|
|
||||||
#%require #%provide
|
|
||||||
#%variable-reference))) ()
|
|
||||||
[(head rest ...)
|
[(head rest ...)
|
||||||
(if (free-identifier=? #'head #'begin)
|
(if (free-identifier=? #'head #'begin)
|
||||||
(accumulate-actions action-ids
|
(accumulate-actions action-ids
|
||||||
|
|
Loading…
Reference in New Issue