|
|
|
@ -71,19 +71,12 @@
|
|
|
|
|
[lexeme-srcloc (make-rename-transformer #'lexeme-srcloc-p)])
|
|
|
|
|
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)
|
|
|
|
|
(λ (stx)
|
|
|
|
|
(syntax-case stx ()
|
|
|
|
|
[(_ . RE+ACTS)
|
|
|
|
|
(begin-with-disappeared-uses
|
|
|
|
|
(with-disappeared-uses
|
|
|
|
|
(let ()
|
|
|
|
|
(define spec/re-acts (syntax->list #'RE+ACTS))
|
|
|
|
|
(for/and ([x (in-list spec/re-acts)])
|
|
|
|
|
(syntax-case x ()
|
|
|
|
@ -149,7 +142,7 @@
|
|
|
|
|
SPEC-COMMENT-ACT-STX
|
|
|
|
|
EOF-ACT-STX)])
|
|
|
|
|
;; reverse eta to get named procedures:
|
|
|
|
|
(λ (port) (proc port)))))))])))
|
|
|
|
|
(λ (port) (proc port))))))))])))
|
|
|
|
|
|
|
|
|
|
(define-syntax lexer (make-lexer-macro 'lexer #f))
|
|
|
|
|
(define-syntax lexer-src-pos (make-lexer-macro 'lexer-src-pos 'lexer-src-pos))
|
|
|
|
|