From 9c0dd9262801df610e290f9637668abc7b3e1471 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Tue, 17 Jun 2025 12:16:23 +0200 Subject: [PATCH] ide: Navigator highlighting improved --- uppsrc/ide/clang/Signature.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/uppsrc/ide/clang/Signature.cpp b/uppsrc/ide/clang/Signature.cpp index 55d65915c..9d96387f5 100644 --- a/uppsrc/ide/clang/Signature.cpp +++ b/uppsrc/ide/clang/Signature.cpp @@ -322,6 +322,16 @@ Vector ParsePretty(const String& name, const String& signature, in p.pos = (int)(s - ~signature); p.type = ITEM_TEXT; p.pari = pari; + + auto Pname = [&] { + if(lastidi >= 0) { + if(was_type) + part[lastidi].type = ITEM_PNAME; + lastidi = -1; + } + was_type = false; + }; + int n = 1; if(*s >= '0' && *s <= '9') { while(s[n] >= '0' && s[n] <= '9' || (s[n] == 'x' || s[n] == 'X')) @@ -379,17 +389,14 @@ Vector ParsePretty(const String& name, const String& signature, in if(sOperatorTab[(byte)*s]) { while(sOperatorTab[(byte)s[n]]) n++; + if(*s == '=' && par == 0) { + Pname(); + p.pari = -1; + pari++; + } p.type = ITEM_CPP; } else { - auto Pname = [&] { - if(lastidi >= 0) { - if(was_type) - part[lastidi].type = ITEM_PNAME; - lastidi = -1; - } - was_type = false; - }; p.type = ITEM_SIGN; if(pari >= 0) { if(*s == '(' || *s == '<')