This commit is contained in:
Jay McCarthy 2010-06-24 15:31:42 -06:00
parent e752682879
commit 73b4059ade
2 changed files with 13 additions and 13 deletions

View File

@ -27,7 +27,7 @@
[(struct literal (_ pred terms)) [(struct literal (_ pred terms))
(h-append (format-datum pred) (h-append (format-datum pred)
lparen lparen
(v-concat/s (apply-infix comma (map format-term terms))) (v-concat/s (apply-infix ", " (map format-term terms)))
rparen)])) rparen)]))
(define (format-literals ls) (define (format-literals ls)
(v-concat (v-concat
@ -40,8 +40,8 @@
(format-literal (clause-head c)) (format-literal (clause-head c))
(nest 4 (nest 4
(v-concat/s (v-concat/s
(list* (h-append (format-literal (clause-head c)) space (text ":-")) (list* (h-append (format-literal (clause-head c)) space (text ":-") space)
(apply-infix comma (map format-literal (clause-body c)))))))) (apply-infix ", " (map format-literal (clause-body c))))))))
(define (format-assertion a) (define (format-assertion a)
(h-append (format-clause (assertion-clause a)) (h-append (format-clause (assertion-clause a))
dot)) dot))

View File

@ -18,18 +18,18 @@
(test-color "\n" 'whitespace) (test-color "\n" 'whitespace)
(test-color "% \n" 'comment) (test-color "% \n" 'comment)
(test-color "% 12 31 2 6\n" 'comment) (test-color "% 12 31 2 6\n" 'comment)
(test-color "Var" 'identifier) (test-color "Var" 'symbol)
(test-color "V124_3" 'identifier) (test-color "V124_3" 'symbol)
(test-color "var" 'keyword) (test-color "var" 'identifier)
(test-color "123var" 'keyword) (test-color "123var" 'identifier)
(test-color "(" 'parenthesis) (test-color "(" 'parenthesis)
(test-color ")" 'parenthesis) (test-color ")" 'parenthesis)
(test-color "=" 'default) (test-color "=" 'parenthesis)
(test-color "?" 'default) (test-color "?" 'parenthesis)
(test-color "~" 'default) (test-color "~" 'parenthesis)
(test-color "." 'default) (test-color "." 'parenthesis)
(test-color "," 'default) (test-color "," 'parenthesis)
(test-color ":-" 'default) (test-color ":-" 'parenthesis)
(test-color "\"foo\"" 'string) (test-color "\"foo\"" 'string)
(test-color "\"fo\\\"o\"" 'string) (test-color "\"fo\\\"o\"" 'string)
(test-color "\"fo\no\"" 'string) (test-color "\"fo\no\"" 'string)