This commit is contained in:
Aki Sakurai 2025-12-15 19:53:41 +08:00 committed by GitHub
commit a87a8b7ae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -208,7 +208,7 @@ namespace hex::plugin::builtin {
std::string getVariableTypeName();
/// Append the variable definitions of the parent to the child
void appendInheritances();
void recurseInheritances(std::string name);
void recurseInheritances(std::string name, size_t depth = 0);
///Loads a map of identifiers to their token id instances
void loadInstances();
/// Replace auto with the actual type for template arguments and function parameters

View File

@ -1602,10 +1602,12 @@ namespace hex::plugin::builtin {
}
}
void TextHighlighter::recurseInheritances(std::string name) {
void TextHighlighter::recurseInheritances(std::string name, size_t depth) {
if (depth > m_inheritances.size())
return;
if (m_inheritances.contains(name)) {
for (auto inheritance: m_inheritances[name]) {
recurseInheritances(inheritance);
recurseInheritances(inheritance, depth + 1);
auto definitions = m_UDTVariables[inheritance];
if (definitions.empty())
definitions = m_ImportedUDTVariables[inheritance];