[mod] tidy

This commit is contained in:
Andy Bunce 2025-10-30 10:42:59 +00:00
parent c4d2770bae
commit 30f913906d
4 changed files with 46 additions and 28 deletions

View file

@ -70,7 +70,8 @@ declare
function rpc:send($msg as map(*))
as empty-sequence()
{
rpc:admin-log($msg,"⬅️"),ws:send($msg ,ws:id())
rpc:admin-log($msg,"⬅️"),
ws:send($msg ,ws:id())
};
(:~ canned initialize response :)

View file

@ -84,3 +84,14 @@ declare function pos:full-range($text as xs:string)
as lspt:Range{
lspt:Range(pos:toPosition($text,0), pos:toPosition($text, string-length($text)))
};
(:~ range for $text from indices:)
declare function pos:range-from-ast(
$text as xs:string,
$ast as element(*))
as lspt:Range{
lspt:Range(
pos:toPosition($text,number($ast/@start)),
pos:toPosition($text, number($ast/@end))
)
};