Skip to content

Commit

Permalink
fix: Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
famoser committed Mar 24, 2024
1 parent fbaa870 commit b7b6de1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions server/src/go_to_definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export const getDefinitionSymbolFromPosition = async (identifier: TextDocumentId
export const getDefinitionSymbolFromMatch = async (parseResult: ParseResult, matchingParseTree: TerminalNode, documentManager: DocumentManagerInterface): Promise<DefinitionSymbol | undefined> => {
const definition = getDefinitionSymbolFromMatchMacroAware(parseResult, matchingParseTree, documentManager, false);
if (definition) {
return definition
return definition;
}

return getDefinitionSymbolFromMatchMacroAware(parseResult, matchingParseTree, documentManager, true)
return getDefinitionSymbolFromMatchMacroAware(parseResult, matchingParseTree, documentManager, true);
};

export const getDefinitionSymbolFromMatchMacroAware = async (parseResult: ParseResult, matchingParseTree: TerminalNode, documentManager: DocumentManagerInterface, considerMacros: boolean): Promise<DefinitionSymbol | undefined> => {
Expand Down
6 changes: 3 additions & 3 deletions server/src/tasks/create_symbol_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class SymbolTableVisitor extends AbstractParseTreeVisitor<ProverifSymbolTable> i
} else if (ctx.QUERY()) {
this.registerNevartypeParameters(() => ctx.nevartype());
this.visitInner(() => ctx.tqueryseq());
} else if (ctx.NONINTERF() || ctx.NOT() || ctx.lemma()) {
} else if (ctx.NONINTERF()) {
this.registerNevartypeParameters(() => ctx.nevartype());
this.visitInner(() => ctx.niseq());
} else if (ctx.NOT()) {
Expand Down Expand Up @@ -435,9 +435,9 @@ export class ProverifSymbolTable {

// if in OTHERWISE, then jump directly to the real parent, not the previous clauses
if (context instanceof TreducotherwiseContext) {
let realParent = context.parent
let realParent = context.parent;
while (realParent instanceof TreducotherwiseContext || realParent instanceof TreducmayfailContext) {
realParent = realParent.parent
realParent = realParent.parent;
}

return this.findClosestSymbolInternal(name, realParent, considerMacros);
Expand Down
2 changes: 1 addition & 1 deletion server/src/tasks/ident_collectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export const collectIdentifier = (getIdentifer: () => TerminalNode | undefined):

export const collectSingleIdentifiers = (getIdentifer: () => TerminalNode | undefined): TerminalNode[] => {
const identifier = tryGetTerminal(getIdentifer);
return [identifier].filter(nonNullable)
return [identifier].filter(nonNullable);
};

export const collectIdentifiers = (getIdentifer: () => TerminalNode[]): TerminalNode[] => {
Expand Down

0 comments on commit b7b6de1

Please sign in to comment.