diff options
Diffstat (limited to 'stream.sml')
-rw-r--r-- | stream.sml | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -28,12 +28,13 @@ structure Stream :> STREAM = struct end z - fun pos2str (Pos (pos, line, col)) = + val Ppos = fn z => let - val % = Int.toString + fun p (out, Pos (fname, line, col)) = + Printf out `fname `":" I line `":" I col % in - pos ^ ":" ^ %line ^ ":" ^ %col - end + bind A1 p + end z fun getcharSure (S as { contents, off, ... }: t) = (String.sub (contents, off), updateStream S s#off (off + 1) %) |