================
@@ -2074,6 +2076,64 @@ static const Definition *FindEntry(const llvm::StringRef 
&format_str,
   return parent;
 }
 
+/// Parses a single highlighting format specifier.
+///
+/// Example syntax for such specifier:
+/// \code
+/// ${function.name-with-args:%highlight_basename(ansi.fg.green)}
----------------
Michael137 wrote:

@felipepiovezan pointed out that maybe we could have something like the 
following:
```
${function.return}${function.scope}${function.basename}${function.arguments}
```
instead of a format specifier. That way the user could highlight/omit the bits 
of the frame name they want, without having a dedicated implementation for each.

That would also make `${function.name-without-args}` redundant. If people 
prefer that, I'm happy to give that a shot. I implemented something similar in 
early prototypes, but felt that having dedicated variables for each part of the 
function name feels redundant for most use-cases. But thinking about again, it 
does synergize nicely with the existing color support of `frame-format`.

We'll have to handle these variables inside the language plugins however. So 
there needs to be some sensible fallback for when a plugin doesn't know what a 
`basename` is yet.

https://github.com/llvm/llvm-project/pull/131836
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to