add a visit link command
This commit is contained in:
11
gem300.rkt
11
gem300.rkt
@@ -39,7 +39,10 @@
|
|||||||
(iter 10)
|
(iter 10)
|
||||||
(newline)
|
(newline)
|
||||||
(let ([remaining (pipe-content-length document-buffer)])
|
(let ([remaining (pipe-content-length document-buffer)])
|
||||||
(printf "~a bytes remaining\n" remaining)))
|
(printf "~a bytes remaining\n" remaining)))
|
||||||
|
|
||||||
|
(define (visit-cmd line)
|
||||||
|
(go-cmd (gmi:match-link document (string->number line))))
|
||||||
|
|
||||||
(define (repl)
|
(define (repl)
|
||||||
(display "G-300 > ")
|
(display "G-300 > ")
|
||||||
@@ -55,6 +58,10 @@
|
|||||||
;; go command
|
;; go command
|
||||||
[(or (string=? (cadr matches) "go")
|
[(or (string=? (cadr matches) "go")
|
||||||
(string=? (cadr matches) "g"))
|
(string=? (cadr matches) "g"))
|
||||||
(go-cmd (caddr matches))]))
|
(go-cmd (caddr matches))]
|
||||||
|
|
||||||
|
;; visit link command
|
||||||
|
[(andmap char-numeric? (string->list (cadr matches)))
|
||||||
|
(visit-cmd (cadr matches))]))
|
||||||
|
|
||||||
(repl))
|
(repl))
|
||||||
|
Reference in New Issue
Block a user