diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-03-25 00:24:52 +0100 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-03-25 00:24:52 +0100 |
commit | a0be166ef23e1b34b09060b99c03cdadb6ac2132 (patch) | |
tree | 3a54e586b504c6ad4fcb5b620c0ddcead5219ae6 /stream.sml | |
parent | 226f58656b4b7f92f6de9a817ab9106937e061e9 (diff) |
Escape sequences
Diffstat (limited to 'stream.sml')
-rw-r--r-- | stream.sml | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |