diff options
Diffstat (limited to 'scheme')
-rw-r--r-- | scheme/chibi/geiser/geiser.scm | 27 | ||||
-rw-r--r-- | scheme/chibi/geiser/geiser.sld | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/scheme/chibi/geiser/geiser.scm b/scheme/chibi/geiser/geiser.scm index 96399c3..6ba3edd 100644 --- a/scheme/chibi/geiser/geiser.scm +++ b/scheme/chibi/geiser/geiser.scm @@ -1,3 +1,4 @@ +; -*- geiser-scheme-implementation:chibi; -*- (define (all-environment-exports environment prefix) (if environment (append (filter (lambda (identifier) @@ -92,3 +93,29 @@ (define (geiser:newline) #f) +;(define (geiser:symbol-location) + ; '("geiser-chibi-error" "Not implemented")) + +;;> A chibi implementation of the standard geiser's location-making +;;> subrouting. \var{file} is a string representing file name with path, +;;> \var{line} is the line number starting from 0 (scheme way). + +(define (make-location file line) + (list (cons "file" (if (string? file) file '())) + (cons "line" (if (number? line) (+ 1 line) '())))) + +;;> A function to find the file where the symbol +;;> \var{symbol-representing-module} is defined. + +(define (geiser:module-location symbol-representing-module) + (make-location + (find-module-file + (module-name->file + (module-name + (find-module symbol-representing-module) + ) + ) + ) + 0 + ) +) diff --git a/scheme/chibi/geiser/geiser.sld b/scheme/chibi/geiser/geiser.sld index a60b7de..30c0986 100644 --- a/scheme/chibi/geiser/geiser.sld +++ b/scheme/chibi/geiser/geiser.sld @@ -1,9 +1,12 @@ +; -*- geiser-scheme-implementation:chibi; -*- (define-library (geiser) (export geiser:completions geiser:eval geiser:autodoc geiser:module-completions geiser:no-values +; geiser:symbol-location + geiser:module-location geiser:newline) (import (scheme small) (chibi modules) (chibi) (meta) (chibi ast) (chibi string) (srfi 1) (srfi 95) (chibi show)) (include "geiser.scm")) |