added missing punctuations that are allowd in scribble parens.

This commit is contained in:
Abdulaziz Ghuloum 2009-07-29 19:43:49 +03:00
parent ac3581286f
commit 7d2c1b0b9e
2 changed files with 13 additions and 10 deletions

View File

@ -1227,16 +1227,19 @@
(append a*^ b*^)
locs k))]
[else (values a* a*^ locs k)]))))
(define puncs
'([#\| . #\|]
[#\< . #\>]
[#\[ . #\]]
[#\( . #\)]
[#\! . #\!]
[#\- . #\-]))
(define (left-punc? c)
(and (assv c (cdr puncs)) #t))
(define (rev-punc c) (cdr (assv c puncs)))
(define chars "([<!?~$%^&*-_+=:")
(let f ([i 0])
(cond
[(= i (string-length chars)) #f]
[(char=? c (string-ref chars i)) #t]
[else (f (+ i 1))])))
(define (rev-punc c)
(cond
[(char=? c #\() #\)]
[(char=? c #\[) #\]]
[(char=? c #\<) #\>]
[else c]))
(define (read-at-bar p locs k text-mode?)
(let ([c (peek-char p)])
(cond

View File

@ -1 +1 @@
1830
1831