read-one-special changed to read-special
original commit: f155bff971fe1bb1b6ce7d66fac9d81c051711e9
This commit is contained in:
parent
d46b5f6cf8
commit
04768213fe
|
@ -8,19 +8,17 @@
|
|||
(define simple-sexp-snip%
|
||||
(class* snip% (readable-snip<%>)
|
||||
(init-field left-bracket right-bracket saved-snips)
|
||||
(define/public (read-one-special index file line col pos)
|
||||
(define/public (read-special file line col pos)
|
||||
(let ([text (make-object text%)])
|
||||
(for-each
|
||||
(lambda (s) (send text insert (send s copy)
|
||||
(send text last-position)
|
||||
(send text last-position)))
|
||||
saved-snips)
|
||||
(values (datum->syntax-object
|
||||
#f
|
||||
(read (open-input-text-editor text))
|
||||
(list file line col pos 1))
|
||||
1
|
||||
#t)))
|
||||
(datum->syntax-object
|
||||
#f
|
||||
(read (open-input-text-editor text))
|
||||
(list file line col pos 1))))
|
||||
(super-instantiate ())))
|
||||
|
||||
(define sexp-snipclass% (make-sexp-snipclass% simple-sexp-snip%))
|
||||
|
|
|
@ -123,9 +123,8 @@
|
|||
[snip (loop (send snip next) snip)]
|
||||
[else acc])))
|
||||
|
||||
(define/public (read-one-special index source line column position)
|
||||
(raise (make-special-comment
|
||||
1)))
|
||||
(define/public (read-special source line column position)
|
||||
(raise (make-special-comment "comment")))
|
||||
(super-instantiate ())
|
||||
(inherit set-snipclass)
|
||||
(set-snipclass snipclass))))))
|
|
@ -291,8 +291,8 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(define/public (read-one-special index file line col pos)
|
||||
(values number 1 #t))
|
||||
(define/public (read-special file line col pos)
|
||||
number)
|
||||
|
||||
(define/override get-text
|
||||
(case-lambda
|
||||
|
|
|
@ -72,19 +72,17 @@
|
|||
(define/public (get-saved-snips) saved-snips)
|
||||
(field [sizing-text (format "~a ~a" left-bracket right-bracket)])
|
||||
|
||||
(define/public (read-one-special index file line col pos)
|
||||
(define/public (read-special file line col pos)
|
||||
(let ([text (make-object text:basic%)])
|
||||
(for-each
|
||||
(lambda (s) (send text insert (send s copy)
|
||||
(send text last-position)
|
||||
(send text last-position)))
|
||||
saved-snips)
|
||||
(values (datum->syntax-object
|
||||
#f
|
||||
(read (open-input-text-editor text))
|
||||
(list file line col pos 1))
|
||||
1
|
||||
#t)))
|
||||
(datum->syntax-object
|
||||
#f
|
||||
(read (open-input-text-editor text))
|
||||
(list file line col pos 1))))
|
||||
|
||||
(define/override get-text
|
||||
(opt-lambda (offset num [flattened? #f])
|
||||
|
|
Loading…
Reference in New Issue
Block a user