Allow use of Pygments to colorize source code
[deliverable/binutils-gdb.git] / gdb / extension.h
index 5da0602e421c2da6089b9ff9fae72c9074ba0d27..ca3fc14bd0fb3a3a89b4fea2e6385a374f93d497 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "mi/mi-cmds.h" /* For PRINT_NO_VALUES, etc.  */
 #include "gdbsupport/array-view.h"
+#include "gdbsupport/gdb_optional.h"
 
 struct breakpoint;
 struct command_line;
@@ -309,4 +310,12 @@ extern void get_matching_xmethod_workers
   (struct type *type, const char *method_name,
    std::vector<xmethod_worker_up> *workers);
 
+/* Try to colorize some source code.  FILENAME is the name of the file
+   holding the code.  CONTENTS is the source code itself.  This will
+   either a colorized (using ANSI terminal escapes) version of the
+   source code, or an empty value if colorizing could not be done.  */
+
+extern gdb::optional<std::string> ext_lang_colorize
+  (const std::string &filename, const std::string &contents);
+
 #endif /* EXTENSION_H */
This page took 0.023241 seconds and 4 git commands to generate.