aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2007-04-03 09:42:14 +0000
committerLudovic Court`es2007-04-03 09:42:14 +0000
commit1d230301e1f70d39b6e5d96e12934546f1b126dd (patch)
tree1302744ada23c1fab80224531abc5a3da15ea5ad
parentfbbaa49d9e953218a08c0cd0c789d9f334cd7bc4 (diff)
downloadskribilo-1d230301e1f70d39b6e5d96e12934546f1b126dd.tar.gz
skribilo-1d230301e1f70d39b6e5d96e12934546f1b126dd.tar.lz
skribilo-1d230301e1f70d39b6e5d96e12934546f1b126dd.zip
Moved legacy source location code to `compat'.
* src/guile/skribilo/lib.scm (skribe-eval-location): Removed. * src/guile/skribilo/location.scm (location-pos): Removed. * src/guile/skribilo/utils/compat.scm: Use `(skribilo location)'. (location-pos, skribe-eval-location): New. git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-40
-rw-r--r--src/guile/skribilo/lib.scm10
-rw-r--r--src/guile/skribilo/location.scm5
-rw-r--r--src/guile/skribilo/utils/compat.scm11
3 files changed, 11 insertions, 15 deletions
diff --git a/src/guile/skribilo/lib.scm b/src/guile/skribilo/lib.scm
index 1bac503..5d96a10 100644
--- a/src/guile/skribilo/lib.scm
+++ b/src/guile/skribilo/lib.scm
@@ -21,7 +21,7 @@
(define-module (skribilo lib)
:use-module (skribilo utils syntax)
- :export (skribe-eval-location skribe-ast-error skribe-error
+ :export (skribe-ast-error skribe-error
skribe-type-error
skribe-warning skribe-warning/ast
skribe-message
@@ -169,14 +169,6 @@
(lambda () (write obj))))))
;;;
-;;; SKRIBE-EVAL-LOCATION ...
-;;;
-(define (skribe-eval-location)
- (format (current-error-port)
- "FIXME: ...... SKRIBE-EVAL-LOCATION (should not appear)\n")
- #f)
-
-;;;
;;; SKRIBE-ERROR
;;;
(define (skribe-ast-error proc msg obj)
diff --git a/src/guile/skribilo/location.scm b/src/guile/skribilo/location.scm
index 1ca278f..6c23f76 100644
--- a/src/guile/skribilo/location.scm
+++ b/src/guile/skribilo/location.scm
@@ -24,7 +24,6 @@
:use-module ((skribilo utils syntax) :select (%skribilo-module-reader))
:export (<location> location? ast-location
location-file location-line location-column
- location-pos
invocation-location))
;;; Author: Ludovic Courtès
@@ -50,10 +49,6 @@
(define (location? obj)
(is-a? obj <location>))
-(define (location-pos loc)
- ;; Kept for compatibility with Skribe. XXX: Move to `compat.scm'.
- 0)
-
(define (ast-location obj)
(let ((loc (slot-ref obj 'loc)))
(if (location? loc)
diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm
index 9f85658..2113e95 100644
--- a/src/guile/skribilo/utils/compat.scm
+++ b/src/guile/skribilo/utils/compat.scm
@@ -1,6 +1,6 @@
;;; compat.scm -- Skribe compatibility module.
;;;
-;;; Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,7 @@
:use-module (skribilo utils files)
:use-module (skribilo parameters)
:use-module (skribilo evaluator)
+ :use-module (skribilo location)
:use-module (srfi srfi-1)
:autoload (srfi srfi-13) (string-rindex)
:use-module (srfi srfi-34)
@@ -178,6 +179,14 @@
(set! %skribe-reader (make-reader 'skribe)))
(%skribe-reader port))
+
+;;;
+;;; Location.
+;;;
+
+(define-public (location-pos loc) 0)
+
+(define-public skribe-eval-location invocation-location)
;;;