From bf38ae8134b62c8239a9c5a1923c117fecb7d283 Mon Sep 17 00:00:00 2001 From: "ALI Mohammadiyeh (Max Base)" Date: Wed, 8 Jan 2025 08:52:09 +0100 Subject: [PATCH] add sign to the function, add to header file --- src/generator_layout.c | 9 +++++++++ src/generator_layout.h | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/generator_layout.c b/src/generator_layout.c index 73f54cd9..cbca4b67 100644 --- a/src/generator_layout.c +++ b/src/generator_layout.c @@ -23,6 +23,15 @@ #include "generator_layout.h" +/** + * + * @function attribute_value_handler + * @brief Handles the value of a layout attribute and transforms it based on its type. + * @param attribute Pointer to the layout attribute structure. + * @param value The string value of the attribute to process. + * @return A dynamically allocated string containing the processed value, or NULL if the handler type is unsupported. + * + */ char* attribute_value_handler(ast_layout_attribute_t* attribute, char* value) { switch (attribute->value_handler) { diff --git a/src/generator_layout.h b/src/generator_layout.h index 2864402f..4ead56cb 100644 --- a/src/generator_layout.h +++ b/src/generator_layout.h @@ -35,6 +35,17 @@ #include "memory.h" #include "string_buffer.h" +/** + * + * @function attribute_value_handler + * @brief Handles the value of a layout attribute and transforms it based on its type. + * @param attribute Pointer to the layout attribute structure. + * @param value The string value of the attribute to process. + * @return A dynamically allocated string containing the processed value, or NULL if the handler type is unsupported. + * + */ +char* attribute_value_handler(ast_layout_attribute_t* attribute, char* value); + /** * * @function generator_code_layout_value