[mod] v0.0.64

This commit is contained in:
Andy Bunce 2023-01-26 11:32:14 +00:00
parent 52237c8267
commit 6d074b29c9
10 changed files with 64 additions and 46 deletions

View file

@ -1,10 +1,10 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { XQLint } from '@quodatum/xqlint';
import { VarType, FunType, XQLint } from '@quodatum/xqlint';
import {SymbolKind, DocumentSymbol, DocumentSymbolProvider,
Range, Position, TextDocument,CancellationToken} from 'vscode';
import { channel } from "../common/logger";
//
// This class handles Symbols
// This class handles XQuery Symbols
//
function makeSymbol(name: string, description: string, icon: SymbolKind, pos: any) {
const spos = new Position(pos.sl, pos.sc);
@ -13,15 +13,7 @@ function makeSymbol(name: string, description: string, icon: SymbolKind, pos: an
const selrange = new Range(spos, spos);
return new DocumentSymbol(name, description, icon, fullrange, selrange);
}
export type VarType = {
name: string;
pos: any;
};
export type FunType = {
name: string;
params: string[]; // name
pos: boolean;
};
export class Symbols implements DocumentSymbolProvider {
provideDocumentSymbols = async (