File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,10 @@ test: "unnecessary quasiquotation with constants refactorable to list"
139139------------------------------
140140
141141
142+ test: "quasiquotation with only constants not refactorable to list "
143+ - `(1 2 3 )
144+
145+
142146test: "unnecessary splicing quasiquotation refactorable to append "
143147------------------------------
144148(define (f xs ys zs)
Original file line number Diff line number Diff line change 106106
107107
108108(define-syntax-class unquoted
109- #:attributes (expr)
109+ #:attributes (expr literal? )
110110 #:literals (unquote )
111- (pattern expr:literal-constant)
112- (pattern (unquote expr)))
111+ (pattern expr:literal-constant #:attr literal? #true )
112+ (pattern (unquote expr) #:attr literal? #false ))
113113
114114
115115(define-refactoring-rule quasiquote-to-list
116116 #:description "This quasiquotation is equialent to a simple `list` call. "
117117 #:literals (quasiquote )
118118 (quasiquote (arg:unquoted ... ))
119+ #:when (for/or ([literal? (in-list (attribute arg.literal?))])
120+ (not literal?))
119121 (list arg.expr ... ))
120122
121123
You can’t perform that action at this time.
0 commit comments