summaryrefslogtreecommitdiff
path: root/ppc.fun
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-05-25 19:59:56 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-05-25 19:59:56 +0200
commitd9c809a5550b2fe23b2fd1e66672b503730d55f1 (patch)
tree6f8001d56823305f9f93c52833362b28e9d2def4 /ppc.fun
parent2a1cfad37d5e87b2d7eb3c9da16db66364a9b9a3 (diff)
Expression parsing
Diffstat (limited to 'ppc.fun')
-rw-r--r--ppc.fun18
1 files changed, 17 insertions, 1 deletions
diff --git a/ppc.fun b/ppc.fun
index bb07107..6f4e8b2 100644
--- a/ppc.fun
+++ b/ppc.fun
@@ -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