Fixed {~^ power:nat} for the match expander (the . rest was missing)
This commit is contained in:
parent
c7c2549695
commit
7465aead4c
|
@ -285,6 +285,8 @@
|
||||||
(syntax-parser
|
(syntax-parser
|
||||||
#:context context
|
#:context context
|
||||||
#:literals (^ * + - ∞ once)
|
#:literals (^ * + - ∞ once)
|
||||||
|
[({~do (displayln this-syntax)} #:oops-nope)
|
||||||
|
#'trbgfdsctgbrfvdc]
|
||||||
[()
|
[()
|
||||||
#'(list)]
|
#'(list)]
|
||||||
[rest:not-stx-pair
|
[rest:not-stx-pair
|
||||||
|
@ -335,7 +337,7 @@
|
||||||
#`(list-rest-ish [] base ellipsis #,(xl #'rest))]
|
#`(list-rest-ish [] base ellipsis #,(xl #'rest))]
|
||||||
[(:base {~^ once} . rest)
|
[(:base {~^ once} . rest)
|
||||||
#`(list-rest-ish [] base #|no ellipsis|# #,(xl #'rest))]
|
#`(list-rest-ish [] base #|no ellipsis|# #,(xl #'rest))]
|
||||||
[(:base {~^ power:nat})
|
[(:base {~^ power:nat} . rest)
|
||||||
#:with occurrences (gensym 'occurrences)
|
#:with occurrences (gensym 'occurrences)
|
||||||
#`(list-rest-ish [(? (λ (_) (= (length occurrences) power)))]
|
#`(list-rest-ish [(? (λ (_) (= (length occurrences) power)))]
|
||||||
(and occurrences base) ooo
|
(and occurrences base) ooo
|
||||||
|
|
Loading…
Reference in New Issue
Block a user