[m-dev.] for review: new module for handling file offsets
Peter Schachte
schachte at cs.mu.OZ.AU
Tue Mar 9 09:25:46 AEDT 1999
> For review by anyone. The long-term intention is to replace the line numbers
> in term__contexts with file offsets, which are the same size but carry more
> information. This extra information can be useful to the debugger, as well
> as for better error messages.
Excellent!
Often (usually?) when dealing with source code, what you really want
to represent is a *region* of the file. For error reporting, this
would allow you to highlight or underline exactly the part of the code
that is in error. For debugging, it would let you highlight all and
only the current goal, even if it spans multiple lines or shares a
line with other goals.
Therefore, I suggest adding a `file_region' type to this module (or
maybe you can suggest a better name than this), and operations to
convert a file_region to a pair(line_column) based on the database.
Given this, I believe term__contexts should hold file_regions, rather
than single offsets.
--
Peter Schachte Hofstadter's Law: It always takes longer
mailto:schachte at cs.mu.OZ.AU than you expect, even when you take
http://www.cs.mu.oz.au/~schachte/ Hofstadter's Law into account.
PGP: finger schachte at 128.250.37.3
More information about the developers
mailing list