Hi,

I use Guile to program a small compiler. I track the source location of
my individual tokens using port-line and port-column. However my column
numbers are slightly off depending on the number of tabs in that line.
It seems the Guile ports count each tab as up to 8 characters.

This is the relevant code in ports.h

#define SCM_TABCOL(port)      do {SCM_COL (port) += 8 - SCM_COL (port) %
8;} while (0)

I think it would be more intuitive to count one tab as one character
(afaik gcc does it this way). Is there a good reason for the current
behavior?

Sincerely,
Marco

PS: Writing a compiler in Guile is great fun! Thanks to all the Guile
developers for this awesome piece of software.


Reply via email to