adjusted metafunction application rendering so that ellipses do not
get commas put in front of them
This commit is contained in:
parent
c6fc7137ee
commit
ce211ac364
|
@ -258,9 +258,13 @@
|
|||
(just-after (close-white-square-bracket) last)))]
|
||||
[(null? (cddr lst))
|
||||
(cons (car lst) (loop (cdr lst)))]
|
||||
[else (list* (car lst)
|
||||
(just-after (basic-text "," (default-style)) (car lst))
|
||||
(loop (cdr lst)))]))))
|
||||
[else
|
||||
(if (eq? '... (lw-e (cadr lst)))
|
||||
(cons (car lst)
|
||||
(loop (cdr lst)))
|
||||
(list* (car lst)
|
||||
(just-after (basic-text "," (default-style)) (car lst))
|
||||
(loop (cdr lst))))]))))
|
||||
|
||||
(define (just-before what lw)
|
||||
(build-lw (if (symbol? what)
|
||||
|
|
|
@ -187,6 +187,18 @@
|
|||
;; make sure two metafunctions simultaneously rewritten line up properly
|
||||
(test (render-metafunctions S T TL) "metafunctions-multiple.png")
|
||||
|
||||
;; make sure that the ellipses don't have commas before them.
|
||||
(define-metafunction lang
|
||||
rdups : x ... -> (x ...)
|
||||
[(rdups x_1 x_2 ... x_1 x_3 ...)
|
||||
(rdups x_2 ... x_1 x_3 ...)]
|
||||
[(rdups x_1 x_2 ...)
|
||||
(x_1 x_3 ...)
|
||||
(where (x_3 ...) (rdups x_2 ...))]
|
||||
[(rdups) ()])
|
||||
|
||||
(test (render-metafunction rdups) "rdups.png")
|
||||
|
||||
;; Non-terminal superscripts
|
||||
(test (render-lw lang (to-lw (x_^abcdef x_q^abcdef)))
|
||||
"superscripts.png")
|
||||
|
|
BIN
collects/redex/tests/bmps-macosx/rdups.png
Normal file
BIN
collects/redex/tests/bmps-macosx/rdups.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Loading…
Reference in New Issue
Block a user