diff --git a/server/src/completion.ts b/server/src/completion.ts index 7b6e5af..ed8b719 100644 --- a/server/src/completion.ts +++ b/server/src/completion.ts @@ -20,15 +20,15 @@ export const getCompletion = async (identifier: TextDocumentIdentifier, position return undefined; } - const tokensCount = contextTokens.length + const tokensCount = contextTokens.length; if (contextTokens.length > 0 && contextTokens[tokensCount-1].type === ProverifParser.SET) { - return Object.getOwnPropertyNames(setRules).map(label => ({ label, kind: CompletionItemKind.Keyword})) + return Object.getOwnPropertyNames(setRules).map(label => ({ label, kind: CompletionItemKind.Keyword})); } if (contextTokens.length > 2 && contextTokens[tokensCount-3].type === ProverifParser.SET && contextTokens[tokensCount-1].type === ProverifParser.EQUAL) { - const ruleName = contextTokens[tokensCount-2].text + const ruleName = contextTokens[tokensCount-2].text; if (ruleName && ruleName in setRules) { - return setRules[ruleName].map(label => ({ label, kind: CompletionItemKind.Value })) + return setRules[ruleName].map(label => ({ label, kind: CompletionItemKind.Value })); } } @@ -112,12 +112,12 @@ const setRules: { [key in string]: string[] } = { verboseRedundant: ["false", "true"], verboseCompleted: ["false", "true"], verboseGoalReachable: ["true", "false"], -} +}; const createCompletionItem = (text: string): CompletionItem => { return { label: text, kind:CompletionItemKind.Keyword - } -} + }; +}; diff --git a/server/src/parseTree/get_content_token.ts b/server/src/parseTree/get_content_token.ts index 79602f6..6e0d116 100644 --- a/server/src/parseTree/get_content_token.ts +++ b/server/src/parseTree/get_content_token.ts @@ -17,11 +17,11 @@ export const getPreviousContextTokens = (tokens: TokenStream, position: Position const contextTokens: Token[] = []; for (let i = currentContextTokenIndex; i >= 0 && contextTokens.length < max; i--) { - const candidate = tokens.get(i) + const candidate = tokens.get(i); // ignore whitespace and last token if (candidate.type !== ProverifParser.WS && candidate.type !== -1) { - contextTokens.unshift(candidate) + contextTokens.unshift(candidate); } } diff --git a/server/src/server.ts b/server/src/server.ts index 9148264..4e7a34d 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -123,7 +123,7 @@ connection.onCompletion(async params => { } return completions; -}) +}); connection.languages.semanticTokens.on(async params => { const parseResult = await documentManager.getParseResult(params.textDocument); diff --git a/server/src/tasks/invoke_proverif.ts b/server/src/tasks/invoke_proverif.ts index ea96e07..4eb1e75 100644 --- a/server/src/tasks/invoke_proverif.ts +++ b/server/src/tasks/invoke_proverif.ts @@ -170,7 +170,7 @@ const getProverifBinaryMeta = async (proverifBinary: string): Promise