diff options
author | dos-reis <gdr@axiomatics.org> | 2012-05-06 22:02:12 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2012-05-06 22:02:12 +0000 |
commit | baa2d50e5a11158ac998dfc0f3c8d5293666f77a (patch) | |
tree | fdd18c9db3f95045d14bf01200d42de63ac3a93f /src/interp/macros.lisp | |
parent | 3ca02c13b9f1cd5026ce2beec02b812a5e55baef (diff) | |
download | open-axiom-baa2d50e5a11158ac998dfc0f3c8d5293666f77a.tar.gz |
* interp/lexing.boot (indentationLocation): New.
* interp/macros.lisp (expand-tabs): Use it in lieu of NDENT-POS.
* interp/preparse.lisp (PREPARSE1): Likewise.
Diffstat (limited to 'src/interp/macros.lisp')
-rw-r--r-- | src/interp/macros.lisp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/interp/macros.lisp b/src/interp/macros.lisp index 227533d5..c11951cb 100644 --- a/src/interp/macros.lisp +++ b/src/interp/macros.lisp @@ -475,29 +475,10 @@ terminals and empty or at-end files. In Common Lisp, we must assume record size (terpri stream) (finish-output stream))) -;; moved here from preparse.lisp - -(defun NEXT-TAB-LOC (i) (* (1+ (truncate i 8)) 8)) - -(defun INDENT-POS (STR) - (do ((i 0 (1+ i)) - (pos 0)) - ((>= i (length str)) nil) - (case (char str i) - (#\space (incf pos)) - (#\tab (setq pos (next-tab-loc pos))) - (otherwise (return pos))))) - -;;(defun expand-tabs (str) -;; (let ((bpos (nonblankloc str)) -;; (tpos (indent-pos str))) -;; (if (eql bpos tpos) str -;; (concatenate 'string (make-string tpos :initial-element #\space) -;; (subseq str bpos))))) (defun expand-tabs (str) (if (and (stringp str) (> (length str) 0)) (let ((bpos (nonblankloc str)) - (tpos (indent-pos str))) + (tpos (|indentationLocation| str))) (setq str (if (eql bpos tpos) str |