summaryrefslogtreecommitdiff
path: root/stream.sml
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-03-25 00:24:52 +0100
committerVladimir Azarov <avm@intermediate-node.net>2025-03-25 00:24:52 +0100
commita0be166ef23e1b34b09060b99c03cdadb6ac2132 (patch)
tree3a54e586b504c6ad4fcb5b620c0ddcead5219ae6 /stream.sml
parent226f58656b4b7f92f6de9a817ab9106937e061e9 (diff)
Escape sequences
Diffstat (limited to 'stream.sml')
-rw-r--r--stream.sml6
1 files changed, 2 insertions, 4 deletions
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