summaryrefslogtreecommitdiff
path: root/include/lldb/Utility/AnsiTerminal.h
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2015-10-19 23:11:07 +0000
committerSean Callanan <scallanan@apple.com>2015-10-19 23:11:07 +0000
commitb887ead8a206c3636db42060985526697097b58c (patch)
treed8b7ea60eb1c9ac2e19b379cd25f60471ef44d6b /include/lldb/Utility/AnsiTerminal.h
parenta990960b1d50379ca9b932a5da508058483ece7b (diff)
Added the concept of a Read-Eval-Print-Loop to LLDB.
A REPL takes over the command line and typically treats input as source code. REPLs can also do code completion. The REPL class allows its subclasses to implement the language-specific functionality without having to know about the IOHandler-specific internals. Also added a PluginManager-based way of getting to a REPL given a language and a target. Also brought in some utility code and expression options that are useful for REPLs, such as line offsets for expressions, ANSI terminal coloring of errors, and a few IOHandler convenience functions. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@250753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/lldb/Utility/AnsiTerminal.h')
-rw-r--r--include/lldb/Utility/AnsiTerminal.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/lldb/Utility/AnsiTerminal.h b/include/lldb/Utility/AnsiTerminal.h
index 9a5117ae7..a43dd1ba4 100644
--- a/include/lldb/Utility/AnsiTerminal.h
+++ b/include/lldb/Utility/AnsiTerminal.h
@@ -41,8 +41,13 @@
#define ANSI_CTRL_CONCEAL 8
#define ANSI_CTRL_CROSSED_OUT 9
-#define ANSI_ESC_START "\033["
-#define ANSI_ESC_END "m"
+#define ANSI_ESC_START "\033["
+#define ANSI_ESC_END "m"
+
+#define ANSI_STR(s) #s
+#define ANSI_DEF_STR(s) ANSI_STR(s)
+
+#define ANSI_ESCAPE1(s) ANSI_ESC_START ANSI_DEF_STR(s) ANSI_ESC_END
#define ANSI_1_CTRL(ctrl1) "\033["##ctrl1 ANSI_ESC_END
#define ANSI_2_CTRL(ctrl1,ctrl2) "\033["##ctrl1";"##ctrl2 ANSI_ESC_END