From a0be166ef23e1b34b09060b99c03cdadb6ac2132 Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Tue, 25 Mar 2025 00:24:52 +0100 Subject: Escape sequences --- stream.sml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'stream.sml') diff --git a/stream.sml b/stream.sml index 92deb61..eb2cea1 100644 --- a/stream.sml +++ b/stream.sml @@ -18,7 +18,7 @@ structure Stream :> STREAM = struct type t = fileId * string * fileOffset * string - fun recycle (fid, fname, _, contents) = (fid, fname, contents) + fun convert (fid, fname, _, contents) = (fid, fname, contents) fun calcFilePos s offset = let @@ -64,11 +64,9 @@ structure Stream :> STREAM = struct else (fid, fname, off - 1, contents) - fun getOffset (_, _, off, _) = off - fun getPosAfterCharRead (fid, _, off, _) = (fid, off - 1) - fun getPposFromPos (_, pos) (_, fname, _, contents) = + fun pos2ppos (_, pos) (_, fname, _, contents) = let val (line, col) = calcFilePos contents pos in -- cgit v1.2.3