-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from olafurpg/semi-synthetic-definitions
Promote synthetic definitions into normal definitions if they share names
- Loading branch information
Showing
18 changed files
with
192 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
lsif-semanticdb/src/main/java/com/sourcegraph/lsif_semanticdb/SymbolOccurrences.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.sourcegraph.lsif_semanticdb; | ||
|
||
import com.sourcegraph.semanticdb_javac.Semanticdb; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class SymbolOccurrences { | ||
public List<Semanticdb.SymbolOccurrence> occurrences = new ArrayList<>(); | ||
|
||
public void addSyntheticDefinition(String sym) { | ||
occurrences.add( | ||
Semanticdb.SymbolOccurrence.newBuilder() | ||
.setSymbol(sym) | ||
.setRole(Semanticdb.SymbolOccurrence.Role.SYNTHETIC_DEFINITION) | ||
.build()); | ||
} | ||
|
||
public void addDefinition(String sym) { | ||
occurrences.add( | ||
Semanticdb.SymbolOccurrence.newBuilder() | ||
.setSymbol(sym) | ||
.setRole(Semanticdb.SymbolOccurrence.Role.DEFINITION) | ||
.build()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.