[mod] update

This commit is contained in:
Andy Bunce 2025-11-12 22:45:05 +00:00
parent ddd772f563
commit cd369cd51e
11 changed files with 429 additions and 220 deletions

View file

@ -9,7 +9,7 @@ declare variable $syms:actions as hnd:actionMap :={
"ContextValueDecl": syms:action#2,
"VarDecl": syms:VarDecl#2,
"FunctionDecl": syms:FunctionDecl#2,
"ItemTypeDecl": syms:action#2,
"ItemTypeDecl": syms:ItemTypeDecl#2,
"NamedRecordTypeDecl": syms:NamedRecordTypeDecl#2
};
@ -48,7 +48,6 @@ as hnd:State{
return $state
=>map:put("result",($state?result,$sym))
=>map:put("skipchildren",true())
};
declare function syms:FunctionDecl($parse as element(FunctionDecl),$state as hnd:State )
@ -63,6 +62,19 @@ as hnd:State{
=>map:put("skipchildren",true())
};
declare function syms:ItemTypeDecl($parse as element(ItemTypeDecl), $state as hnd:State )
as hnd:State{
let $name:=syms:localName($parse/EQName)
let $range:=pos:range-from-ast($parse/EQName,$state?extras?text)
let $full-range:=pos:range-from-ast($parse,$state?extras?text)
let $sym:=lspt:DocumentSymbol($name,$lspt:SymbolKindMap('TypeParameter'),$range,$full-range,"--TYPE")
=>trace("RECORD")
return $state
=>map:put("result",($state?result,$sym))
=>map:put("skipchildren",true())
};
declare function syms:NamedRecordTypeDecl($parse as element(NamedRecordTypeDecl), $state as hnd:State )
as hnd:State{
let $name:=syms:localName($parse/EQName)