diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-25 19:59:56 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-25 19:59:56 +0200 |
commit | d9c809a5550b2fe23b2fd1e66672b503730d55f1 (patch) | |
tree | 6f8001d56823305f9f93c52833362b28e9d2def4 /ppc.fun | |
parent | 2a1cfad37d5e87b2d7eb3c9da16db66364a9b9a3 (diff) |
Expression parsing
Diffstat (limited to 'ppc.fun')
-rw-r--r-- | ppc.fun | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -147,6 +147,22 @@ struct prefix end + val PtkPos = fn z => + let + fun PtkPos (out, TkPos (p as T.S.Pos (fname, line, col), layers)) = + case layers of + [] => Printf out T.S.Ppos p % + | _ => + let + val prefix = PlayersCompact (out, SOME fname, layers) + val fname = String.extract (fname, size prefix, NONE) + in + Printf out `"; @" T.S.Ppos (T.S.Pos (fname, line, col)) % + end + in + bind A1 PtkPos + end z + val startCache = (0, [], ("", 0)) fun printTokenCompact (off, layers, (fname, line)) out (tk, pos) = @@ -961,7 +977,7 @@ struct updatePpc P u#buffer (updateH head) % end - and getTokenSkipNL ppc = + fun getTokenSkipNL ppc = let val (tk, pos, ppc) = getToken ppc in |