word def name state will handle all whitespaces anyways so simplified state change to it

This commit is contained in:
Richard Thier 2024-09-28 13:02:55 +02:00
parent 4889472dd3
commit 2b2cc47d7a

View File

@ -351,19 +351,18 @@ static inline slc_state slc_def_name_statechange(
} else { } else {
*prefix_i = -1; *prefix_i = -1;
} }
} else {
if(c == ':') {
*prefix_i = 0; /* XXX: restarts scan */
return SLC_WORD_NAME;
}
} }
return current_state; return current_state;
} else { } else {
/* Check if ended by ':' after full prefix or not */ /* Not Found: Probably a word occurence */
if(prevc == ':' && (*prefix_i > 0) && prefix[*prefix_i] == 0) { *prefix_i = 0; /* XXX: restarts scan */
/* Found: a word definition! */ return current_state;
return SLC_WORD_NAME;
} else {
/* Not Found: Probably a word occurence */
*prefix_i = 0; /* XXX: restarts scan */
return current_state;
}
} }
} }