Final tweaks from review comments.

This commit is contained in:
Tony Allevato
2025-03-11 14:58:28 -04:00
parent 7797664bb4
commit d71b42e524
2 changed files with 5 additions and 5 deletions

View File

@@ -916,8 +916,8 @@ private:
assert(Range.getByteLength() > 1);
if (Range.str().front() == '`') {
assert(Range.getByteLength() > 3);
assert(Range.str().consume_front("`_") ||
Range.str().consume_front("`$"));
assert(Range.str().starts_with("`_") ||
Range.str().starts_with("`$"));
auto AfterBacktick = Loc.getAdvancedLoc(2);
reportRef(Wrapped, AfterBacktick, Info, std::nullopt);
} else {

View File

@@ -6,7 +6,7 @@ struct `Struct With Spaces` {}
func test01() {
#^GLOBAL_NAME^#
// GLOBAL_NAME: Decl[FreeFunction]/CurrModule: `func with spaces`()[#Void#]; name=`func with spaces`()
// GLOBAL_NAME-DAG: Decl[FreeFunction]/CurrModule: `func with spaces`()[#Void#]; name=`func with spaces`()
// GLOBAL_NAME-DAG: Decl[TypeAlias]/CurrModule: `Space Alias`[#`Struct With Spaces`#]; name=`Space Alias`
// GLOBAL_NAME-DAG: Decl[Struct]/CurrModule: `Struct With Spaces`[#`Struct With Spaces`#]; name=`Struct With Spaces`
}
@@ -19,14 +19,14 @@ struct S {
func test02(_ x: S) {
x.#^MEMBER_NAME^#
// MEMBER_NAME: Decl[InstanceVar]/CurrNominal: `name with spaces :)`[#Int#]; name=`name with spaces :)`
// MEMBER_NAME-DAG: Decl[InstanceVar]/CurrNominal: `name with spaces :)`[#Int#]; name=`name with spaces :)`
// MEMBER_NAME-DAG: Decl[InstanceMethod]/CurrNominal: `some.method`({#`argument label!`: Int#})[#Void#]; name=`some.method`(`argument label!`:)
// MEMBER_NAME-DAG: Decl[InstanceMethod]/CurrNominal: f({#x: `Struct With Spaces`#})[#Void#]; name=f(x:)
}
struct S2<`Generic Param`> {
var x: #^TYPE_NAME^#
// TYPE_NAME: Decl[GenericTypeParam]/Local: `Generic Param`[#Generic Param#]; name=`Generic Param`
// TYPE_NAME-DAG: Decl[GenericTypeParam]/Local: `Generic Param`[#Generic Param#]; name=`Generic Param`
// TYPE_NAME-DAG: Keyword[Self]/CurrNominal: Self[#S2<Generic Param>#]; name=Self
}