|
50 | 50 | (~@ . after))) |
51 | 51 |
|
52 | 52 |
|
53 | | -(define-syntax-class keywordless-string-join-call |
54 | | - #:attributes ([original 1]) |
| 53 | +(define-splicing-syntax-class keywordless-string-join-call |
55 | 54 | #:literals (string-join) |
56 | | - |
57 | | - (pattern ((~and id string-join) strs) |
58 | | - #:with (original ...) #'(id strs)) |
59 | | - |
60 | | - (pattern ((~and id string-join) strs sep) |
61 | | - #:with (original ...) #'(id sep))) |
| 55 | + (pattern (~seq string-join strs (~optional sep)))) |
62 | 56 |
|
63 | 57 |
|
64 | 58 | (define-syntax-class string-append-and-string-join-expression |
65 | 59 | #:attributes (refactored) |
66 | 60 | #:literals (string-append) |
67 | 61 |
|
68 | | - (pattern (string-append before join-call:keywordless-string-join-call) |
69 | | - #:with refactored #'(join-call.original ... #:before-first before)) |
| 62 | + (pattern (string-append before (join-call:keywordless-string-join-call)) |
| 63 | + #:with refactored #'((~@ . join-call) #:before-first before)) |
70 | 64 |
|
71 | | - (pattern (string-append join-call:keywordless-string-join-call after) |
72 | | - #:with refactored #'(join-call.original ... #:after-last after)) |
| 65 | + (pattern (string-append (join-call:keywordless-string-join-call) after) |
| 66 | + #:with refactored #'((~@ . join-call) #:after-last after)) |
73 | 67 |
|
74 | | - (pattern (string-append before join-call:keywordless-string-join-call after) |
75 | | - #:with refactored #'(join-call.original ... #:before-first before #:after-last after))) |
| 68 | + (pattern (string-append before (join-call:keywordless-string-join-call) after) |
| 69 | + #:with refactored #'((~@ . join-call) #:before-first before #:after-last after))) |
76 | 70 |
|
77 | 71 |
|
78 | 72 | (define-refactoring-rule string-append-and-string-join-to-string-join |
|
0 commit comments