Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Use pretty names for shared static constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugen Wissner authored and Eugen Wissner committed Apr 10, 2022
1 parent 4c08242 commit b0d8d1e
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/cogito/meter.d
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,29 @@ struct Meter
{
auto stringName = this.scoreScope.identifier.toString();

switch (stringName)
if (stringName.empty)
{
case "":
return "(λ)";
case "__ctor":
return "this";
case "__dtor":
return "~this";
default:
return stringName;
return "(λ)";
}
else if (stringName == "__ctor")
{
return "this";
}
else if (stringName == "__dtor")
{
return "~this";
}
else if (stringName.startsWith("_sharedStaticCtor_"))
{
return "shared static this";
}
else if (stringName.startsWith("_sharedStaticDtor_"))
{
return "shared static ~this";
}
else
{
return stringName;
}
}

Expand Down

0 comments on commit b0d8d1e

Please sign in to comment.