================
@@ -0,0 +1,315 @@
+"""
+This module implements a couple of utility classes to make writing
+lldb parsed commands more Pythonic.
+The way to use it is to make a class for you command that inherits from 
ParsedCommandBase.
----------------
jimingham wrote:

The problem with that approach is that completion happens in C++ in the 
CommandInterpreter, and if argparse were doing the parsing, to support 
completion the CommandInterpreter would have to call back to argparse to figure 
out which option was being completed.  
What I tried to do is make the interface for defining your options look the 
same as what you would have written for argparse so that if you have an extant 
command it will be easy to convert it and if you know argparse, you know how to 
define lldb commands already, the only difference being you don't use argparse, 
you add it to our object instead.

Look at the test_commands.py in the tests to get a sense of what that looks 
like.

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

Reply via email to