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

@ -19,7 +19,6 @@ Checks: >
-bugprone-not-null-terminated-result,
-bugprone-reserved-identifier,
-bugprone-sizeof-expression,
-bugprone-suspicious-include,
-bugprone-suspicious-memory-comparison,
-bugprone-swapped-arguments,
-bugprone-switch-missing-default-case,

View File

@ -178,7 +178,6 @@
{ include: [ '"os/mem.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"os/stdpaths.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"os/users.h.generated.h"', private, '"nvim/os/os.h"', public ] },
{ include: [ '"regexp_bt.h.generated.h"', private, '"nvim/regexp.h"', public ] },
{ include: [ '"ui_events_call.h.generated.h"', private, '"nvim/ui.h"', public ] },
{ include: [ '"ui_events_client.h.generated.h"', private, '"nvim/ui_client.h"', public ] },
{ include: [ '"ui_events_remote.generated.h"', private, '"nvim/api/ui.h"', public ] },

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