--- a/src/cx/properties.h Sun Dec 15 12:19:21 2024 +0100 +++ b/src/cx/properties.h Sun Dec 15 13:44:08 2024 +0100 @@ -363,6 +363,21 @@ void cxPropertiesDestroy(CxProperties *prop); /** + * Destroys and re-initializes the properties interface. + * + * You might want to use this, to reset the parser after + * encountering a syntax error. + * + * @param prop the properties interface + */ +cx_attr_nonnull +static inline void cxPropertiesReset(CxProperties *prop) { + CxPropertiesConfig config = prop->config; + cxPropertiesDestroy(prop); + cxPropertiesInit(prop, config); +} + +/** * Initialize a properties parser with the default configuration. * * @param prop the properties interface