[m-dev.] diff: implement offset tracking for source files.
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Jan 27 23:19:24 AEDT 2000
On 27-Jan-2000, Robert_William HUTTON <rwh at ecr.mu.oz.au> wrote:
> This change implements predicates for accessing the offset into a
> source file as it is parsed.
That sentence should IMHO be included at the top of the log message
as a summary.
> library/io.m:
> add predicates to allow access to the offset field. Note
s/add/Add/
> +++ ./library/io.m 2000/01/26 11:18:05
> @@ -472,6 +472,26 @@
> :- mode io__set_line_number(in, in, di, uo) is det.
> % Set the line number of the specified input stream.
>
> +:- pred io__get_offset(int, io__state, io__state).
> +:- mode io__get_offset(out, di, uo) is det.
> +% Return the offset of the current input stream.
> +% Offsets are normally numbered starting at 0.
> +% (but this can be overridden by calling io__set_offset).
s/0./0/
> +:- pred io__get_offset(io__input_stream, int, io__state, io__state).
> +:- mode io__get_offset(in, out, di, uo) is det.
> +% Return the offset of the specified input stream.
> +% Offsets are normally numbered starting at 0.
> +% (but this can be overridden by calling io__set_offset).
Likewise.
Apart from that, this change looks fine.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list