aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-12-31 01:54:34 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-01-02 21:59:12 +0100
commit735aa4c4c89943b26f1d6ba0d3e076002490c09d (patch)
treea96add0d8cfc4d4b86b87786d6c3f45a2f3db9ec /src/nvim/syntax.c
parent3f35c69b23d1bc951f158e4e3d8e554f89bd1037 (diff)
downloadrneovim-735aa4c4c89943b26f1d6ba0d3e076002490c09d.tar.gz
rneovim-735aa4c4c89943b26f1d6ba0d3e076002490c09d.tar.bz2
rneovim-735aa4c4c89943b26f1d6ba0d3e076002490c09d.zip
refactor: remove redundant struct names
A struct can be anonymous if only its typedef is used.
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 4c74682432..30cb3681d4 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -75,7 +75,7 @@ static const char e_trailing_char_after_rsb_str_str[]
// and for the actually highlighted text (_h_start and _h_end).
//
// Note that ordering of members is optimized to reduce padding.
-typedef struct syn_pattern {
+typedef struct {
char sp_type; // see SPTYPE_ defines below
bool sp_syncing; // this item used for syncing
int16_t sp_syn_match_id; // highlight group ID of pattern
@@ -95,7 +95,7 @@ typedef struct syn_pattern {
syn_time_T sp_time;
} synpat_T;
-typedef struct syn_cluster_S {
+typedef struct {
char *scl_name; // syntax cluster name
char *scl_name_u; // uppercase of scl_name
int16_t *scl_list; // IDs in this syntax cluster
@@ -104,7 +104,7 @@ typedef struct syn_cluster_S {
// For the current state we need to remember more than just the idx.
// When si_m_endpos.lnum is 0, the items other than si_idx are unknown.
// (The end positions have the column number of the next char)
-typedef struct state_item {
+typedef struct {
int si_idx; // index of syntax pattern or
// KEYWORD_IDX
int si_id; // highlight group ID for keywords