refactor: combine regexp files

regext_bt.c and regexp_nfa.c are inlined into regexp.c instead of
included as a header. This makes developer tools like clang-tidy and
clangd be able to understand the code better.
This commit is contained in:
dundargoc
2023-11-04 12:25:50 +01:00
committed by dundargoc
parent 92e99bb105
commit 4d757bbfbb
7 changed files with 13273 additions and 13319 deletions

View File

@@ -362,12 +362,6 @@ list(APPEND LINT_NVIM_SOURCES ${NVIM_SOURCES} ${NVIM_HEADERS})
foreach(sfile ${NVIM_SOURCES})
get_filename_component(f ${sfile} NAME)
if(${f} MATCHES "^(regexp_nfa.c)$")
list(APPEND to_remove ${sfile})
endif()
if(${f} MATCHES "^(regexp_bt.c)$")
list(APPEND to_remove ${sfile})
endif()
if(WIN32 AND ${f} MATCHES "^(pty_process_unix.c)$")
list(APPEND to_remove ${sfile})
endif()
@@ -456,8 +450,6 @@ set(LUA_GEN_DEPS ${GENERATOR_PRELOAD} $<TARGET_FILE:nlua0>)
# NVIM_GENERATED_SOURCES: generated source files
# These lists must be mutually exclusive.
foreach(sfile ${NVIM_SOURCES}
"${CMAKE_CURRENT_LIST_DIR}/regexp_bt.c"
"${CMAKE_CURRENT_LIST_DIR}/regexp_nfa.c"
${GENERATED_API_DISPATCH}
"${GENERATED_UI_EVENTS_CALL}"
"${GENERATED_UI_EVENTS_REMOTE}"

File diff suppressed because it is too large Load Diff

View File

@@ -17,12 +17,8 @@
#define REX_USE 2 ///< to allow \z\1 et al.
#define REX_ALL (REX_SET | REX_USE)
// regexp.c
// uncrustify:off
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "regexp.h.generated.h"
# include "regexp_bt.h.generated.h"
#endif
// uncrustify:on
#endif // NVIM_REGEXP_H

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff