Inlines `begin-with-disappeared-uses`, which means the big indentation

change is in this commit instead of the previous one.
master
Jesse A. Tov 5 years ago committed by Matthew Butterick
parent c8851d31c5
commit 785af47262

@ -71,19 +71,12 @@
[lexeme-srcloc (make-rename-transformer #'lexeme-srcloc-p)]) [lexeme-srcloc (make-rename-transformer #'lexeme-srcloc-p)])
action-stx))))) action-stx)))))
(begin-for-syntax
; This macro only exists to keep the indentation below the same,
; in order to make the diff easier to read. So it probably makes
; sense to inline it after reading.
(define-syntax-rule (begin-with-disappeared-uses body0 body ...)
(with-disappeared-uses
(let () body0 body ...))))
(define-for-syntax (make-lexer-macro caller src-loc-style) (define-for-syntax (make-lexer-macro caller src-loc-style)
(λ (stx) (λ (stx)
(syntax-case stx () (syntax-case stx ()
[(_ . RE+ACTS) [(_ . RE+ACTS)
(begin-with-disappeared-uses (with-disappeared-uses
(let ()
(define spec/re-acts (syntax->list #'RE+ACTS)) (define spec/re-acts (syntax->list #'RE+ACTS))
(for/and ([x (in-list spec/re-acts)]) (for/and ([x (in-list spec/re-acts)])
(syntax-case x () (syntax-case x ()
@ -149,7 +142,7 @@
SPEC-COMMENT-ACT-STX SPEC-COMMENT-ACT-STX
EOF-ACT-STX)]) EOF-ACT-STX)])
;; reverse eta to get named procedures: ;; reverse eta to get named procedures:
(λ (port) (proc port)))))))]))) (λ (port) (proc port))))))))])))
(define-syntax lexer (make-lexer-macro 'lexer #f)) (define-syntax lexer (make-lexer-macro 'lexer #f))
(define-syntax lexer-src-pos (make-lexer-macro 'lexer-src-pos 'lexer-src-pos)) (define-syntax lexer-src-pos (make-lexer-macro 'lexer-src-pos 'lexer-src-pos))

Loading…
Cancel
Save