split get-infos

main
Matthew Butterick 5 years ago
parent 0030cb18aa
commit 6cbb96f823

@ -120,7 +120,7 @@
[(? list? xs) (map loop xs)]
[_ x])))
(define (get-info in mod line col pos)
(define (get-info-texty in mod line col pos)
;; DrRacket caches source file information per session,
;; so we can do the same to avoid multiple searches for the command char.
(define command-char-cache (make-hash))
@ -147,3 +147,5 @@
line-start-pos))
(- first-vis-pos line-start-pos))]
[else default])))
(define (get-info-rackety in mod line col pos) (λ (key default) default))

@ -11,6 +11,7 @@
(module reader racket/base
(require "lang-helper.rkt")
(provide (rename-out [rs read-syntax]) get-info)
(define get-info get-info-rackety)
(define rs (make-read-syntax 'quadwriter/lang
(λ (path ip)
(for/list ([tok (in-port read ip)])

@ -24,6 +24,7 @@
(module reader racket/base
(require racket/port markdown "lang-helper.rkt")
(provide read-syntax get-info)
(define get-info get-info-texty)
(define read-syntax (make-read-syntax 'quadwriter/markdown
(λ (path-string p) (xexpr->parse-tree
(parameterize ([current-strict-markdown? #t])

@ -11,6 +11,7 @@
(module reader racket/base
(require "lang-helper.rkt" pollen/decode)
(provide read-syntax get-info)
(define get-info get-info-texty)
(define read-syntax
(make-read-syntax 'quadwriter/markup
(λ (path-string ip)

Loading…
Cancel
Save