[add] connection state

This commit is contained in:
Andy Bunce 2025-08-22 15:22:31 +01:00
parent b7d0d8e03d
commit e32ff3d77a
8 changed files with 81 additions and 28 deletions

View file

@ -1,5 +1,9 @@
import module namespace pos="lsp/position" at "../webapp/lsp/position.xqm";
import module namespace xq4="java:quodatum.parser.xq4";
let $text:="1+2 a"
return pos:toPosition($text,5)
let $xml:=xq4:parseModule($text)=>trace("£ ")
let $b:=number($xml/@b)-1
let $e:= number($xml/@e)-1
return (pos:toPosition($text,$b),
pos:toPosition($text, min(($e,string-length($text)-1))))