Raphael Isemann 566afa0ab2 [LLDB] Added syntax highlighting support
Summary:
This patch adds syntax highlighting support to LLDB. When enabled (and lldb is allowed
to use colors), printed source code is annotated with the ANSI color escape sequences.

So far we have only one highlighter which is based on Clang and is responsible for all
languages that are supported by Clang. It essentially just runs the raw lexer over the input
and then surrounds the specific tokens with the configured escape sequences.

Reviewers: zturner, davide

Reviewed By: davide

Subscribers: labath, teemperor, llvm-commits, mgorny, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D49334

llvm-svn: 338662
2018-08-02 00:30:15 +00:00

38 lines
702 B
CMake

set(EXTRA_CXXFLAGS "")
if (CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT)
set(EXTRA_CXXFLAGS ${EXTRA_CXXFLAGS} -Wno-gnu-anonymous-struct)
endif ()
if (CXX_SUPPORTS_NO_NESTED_ANON_TYPES)
set(EXTRA_CXXFLAGS ${EXTRA_CXXFLAGS} -Wno-nested-anon-types)
endif ()
add_lldb_library(lldbPluginObjCLanguage PLUGIN
ObjCLanguage.cpp
CF.cpp
Cocoa.cpp
CoreMedia.cpp
NSArray.cpp
NSDictionary.cpp
NSError.cpp
NSException.cpp
NSIndexPath.cpp
NSSet.cpp
NSString.cpp
LINK_LIBS
clangAST
lldbCore
lldbDataFormatters
lldbExpression
lldbHost
lldbSymbol
lldbTarget
lldbUtility
lldbPluginAppleObjCRuntime
lldbPluginClangCommon
EXTRA_CXXFLAGS ${EXTRA_CXXFLAGS}
)