[mod] tidy
This commit is contained in:
parent
c4d2770bae
commit
30f913906d
4 changed files with 46 additions and 28 deletions
|
|
@ -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 :)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue