Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle <?> special symbol name from Scala 3 Semanticdb #635

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public SymbolDescriptor entryPoint() {
if (SemanticdbSymbols.isLocal(symbol)) {
return new SymbolDescriptor(Descriptor.local(symbol), SemanticdbSymbols.NONE);
}
if (SemanticdbSymbols.NONE.equals(symbol)) {
if (SemanticdbSymbols.isNone(symbol)) {
return SymbolDescriptor.NONE;
}
readChar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
public final class SemanticdbSymbols {

public static String NONE = "";
public static String NONE_STUB = "<?>";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding a comment explaining why this exists

public static String ROOT_PACKAGE = "_root_/";

/** Creates a new global SemanticDB symbol. */
Expand All @@ -30,6 +31,10 @@ public static boolean isLocal(String symbol) {
return symbol.startsWith("local");
}

public static boolean isNone(String symbol) {
return NONE.equals(symbol) || NONE_STUB.equals(symbol);
}

public static boolean isGlobal(String symbol) {
return !isLocal(symbol);
}
Expand Down
Loading