From d74cd587540cc69bf0e777f71a1d462b7c54f42a Mon Sep 17 00:00:00 2001 From: "penify-dev[bot]" <146478655+penify-dev[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:16:10 +0000 Subject: [PATCH] Generated Documentation --- scripts/config/symbol.c | 127 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 121 insertions(+), 6 deletions(-) diff --git a/scripts/config/symbol.c b/scripts/config/symbol.c index d97b56ab0ece7a..2ba7986c0ffb39 100644 --- a/scripts/config/symbol.c +++ b/scripts/config/symbol.c @@ -39,8 +39,30 @@ struct symbol *modules_sym; static tristate modules_val; int recursive_is_error; +/** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ enum symbol_type sym_get_type(struct symbol *sym) { +/** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ enum symbol_type type = sym->type; if (type == S_TRISTATE) { @@ -49,11 +71,66 @@ enum symbol_type sym_get_type(struct symbol *sym) else if (modules_val == no) type = S_BOOLEAN; } +/** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` +/** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ + * - All other properties remain unchanged. +/** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ + */ + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ return type; } const char *sym_type_name(enum symbol_type type) { + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ switch (type) { case S_BOOLEAN: return "bool"; @@ -77,6 +154,39 @@ struct property *sym_get_choice_prop(struct symbol *sym) for_all_choices(sym, prop) return prop; + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ + * - All other properties remain unchanged. + */ return NULL; } @@ -133,16 +243,21 @@ static void sym_validate_range(struct symbol *sym) break; case S_HEX: base = 16; + /** + * Transforms the sign-up request data to match the backend's expected format. + * + * @param {SignUpRequest} signUpData - The original sign-up request data. + * + * @returns {Object} The transformed sign-up request data with the following changes: + * - `firstName` is mapped to `first_name` + * - `lastName` is mapped to `last_name` + * - `email` is mapped to `username` + * - All other properties remain unchanged. + */ break; default: return; } - prop = sym_get_range_prop(sym); - if (!prop) - return; - val = strtoll(sym->curr.val, NULL, base); - val2 = sym_get_range_val(prop->expr->left.sym, base); - if (val >= val2) { val2 = sym_get_range_val(prop->expr->right.sym, base); if (val <= val2) return;