add a visit link command
This commit is contained in:
11
gem300.rkt
11
gem300.rkt
@@ -39,7 +39,10 @@
|
||||
(iter 10)
|
||||
(newline)
|
||||
(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)
|
||||
(display "G-300 > ")
|
||||
@@ -55,6 +58,10 @@
|
||||
;; go command
|
||||
[(or (string=? (cadr matches) "go")
|
||||
(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))
|
||||
|
Reference in New Issue
Block a user