[mod] symbol opts
This commit is contained in:
parent
b102be8db6
commit
c4d2770bae
3 changed files with 24 additions and 8 deletions
10
test/ast.xq
Normal file
10
test/ast.xq
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import module namespace syms="lsp/symbols" at "../webapp/lsp/ast/ast.xqm";
|
||||
|
||||
declare $file:="C:\Users\mrwhe\git\quodatum\basex-lsp\test\sample.docs\pdfbox.xqm";
|
||||
|
||||
declare variable $A:=doc("C:\Users\mrwhe\git\quodatum\basex-lsp\test\sample.docs\parse-pdfbox.xml");
|
||||
$A update{
|
||||
for $e in .//element()
|
||||
let $len:=string-length($e)
|
||||
return insert node attribute len { $len } into $e
|
||||
}
|
||||
|
|
@ -34,10 +34,11 @@ declare function ast:flatten($input as element()) as element() {
|
|||
(:-------------------------------------------:)
|
||||
|
||||
declare function ast:report($el as element(*)) {
|
||||
<analysis>
|
||||
<total-elements>{count($el//element())}</total-elements>
|
||||
<max-depth>{ast:max-node-depth($el)}</max-depth>
|
||||
</analysis>
|
||||
{
|
||||
"total-elements": count($el//element()),
|
||||
"max-depth": ast:max-node-depth($el),
|
||||
"char-count": string-length($el)
|
||||
}
|
||||
};
|
||||
|
||||
declare function ast:max-depth($nodes as node()*) as xs:integer {
|
||||
|
|
|
|||
|
|
@ -165,11 +165,16 @@
|
|||
<quiet-relative-time live id="relative-time__live" style="width:10em;"></quiet-relative-time>
|
||||
<quiet-dropdown id="dropdown__checkboxes">
|
||||
<quiet-button slot="trigger"><i class='codicon codicon-kebab-vertical'></i></quiet-button>
|
||||
<quiet-dropdown-item type="checkbox" value="canvas" checked>Show canvas</quiet-dropdown-item>
|
||||
<quiet-dropdown-item type="checkbox" value="grid" checked>Show grid</quiet-dropdown-item>
|
||||
<quiet-dropdown-item type="checkbox" value="source">Show source</quiet-dropdown-item>
|
||||
<quiet-dropdown-item type="checkbox" value="canvas" checked>Follow cursor</quiet-dropdown-item>
|
||||
|
||||
<quiet-divider></quiet-divider>
|
||||
<quiet-dropdown-item value="preferences">Preferences…</quiet-dropdown-item>
|
||||
<quiet-radio orientation="vertical" name="sortBy">
|
||||
<quiet-radio-item value="position">sort by: position</quiet-radio-item>
|
||||
<quiet-radio-item value="name">sort by: name</quiet-radio-item>
|
||||
<quiet-radio-item value="category">sort by: category</quiet-radio-item>
|
||||
|
||||
</quiet-radio>
|
||||
|
||||
</quiet-dropdown>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue