Skip to content

Commit

Permalink
delete unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Dec 28, 2024
1 parent d722584 commit add88af
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 190 deletions.
52 changes: 0 additions & 52 deletions src/generator_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,55 +1151,3 @@ char *generator_code_layout_node_type(ast_layout_node_type_t type) {

return "error?";
}

/**
*
* @function generator_code_layout_attribute_name
* @brief Convert AST layout attribute type to HTML attribute name
* @params {ast_layout_attribute_type_t} type - Layout Attribute Type
* @returns {char*} name - Name
*
*/
char *generator_code_layout_attribute_name(ast_layout_attribute_type_t type) {
DEBUG_ME;
switch (type) {
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_REPEAT

#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME, \
GENERATED_NAME, FILTER, \
ALLOWED_VALUES, SUBTAGS) \
case TYPE: \
return NAME;

#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_REPEAT( \
TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME, FILTER, \
ALLOWED_VALUES, SUBTAGS)

#define ADD_LAYOUT_ATTRIBUTE_STYLE_TYPE_HIDE(TYPE, NAME, NAME_LOWER, \
ENDUSER_NAME, GENERATED_NAME, \
FILTER, ALLOWED_VALUES, SUBTAGS) \
case TYPE: \
return NAME;

#include "generated-config/ast_layout_attribute_style_type.h"

#undef ADD_LAYOUT_ATTRIBUTE_TYPE
#undef ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT

#define ADD_LAYOUT_ATTRIBUTE_TYPE(TYPE, NAME, NAME_LOWER, ENDUSER_NAME, \
GENERATED_NAME, FILTER, ALLOWED_VALUES, \
SUBTAGS) \
case TYPE: \
return GENERATED_NAME;

#define ADD_LAYOUT_ATTRIBUTE_TYPE_REPEAT(TYPE, NAME, NAME_LOWER, ENDUSER_NAME, \
GENERATED_NAME, FILTER, \
ALLOWED_VALUES, SUBTAGS)

#include "generated-config/ast_layout_attribute_type.h"
}

return "error2????";
}
9 changes: 0 additions & 9 deletions src/generator_layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,6 @@ string_t *generator_code_layout_attributes(generator_t *generator,
void generator_code_head_meta_children(generator_t *generator,
ast_layout_block_t *block,
string_t *head);
/**
*
* @function generator_code_layout_attribute_name
* @brief Convert AST layout attribute type to HTML attribute name
* @params {ast_layout_attribute_type_t} type - Layout Attribute Type
* @returns {char*} name - Name
*
*/
char *generator_code_layout_attribute_name(ast_layout_attribute_type_t type);

/**
*
Expand Down
94 changes: 0 additions & 94 deletions src/generator_layout_style.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,66 +220,6 @@ char *generator_code_layout_style_name(ast_layout_attribute_type_t type) {
return "error????";
}

/**
*
* @function generator_code_layout_attribute_style_state_type_to_enduser_name
* @brief Convert style attribute state type to enduser name
* @params {ast_layout_attribute_style_state_type} type - Style Attribute State
* Type
* @returns {char*} name - Name
*
*/
char *generator_code_layout_attribute_style_state_type_to_enduser_name(
ast_layout_attribute_style_state_type type) {
DEBUG_ME;
switch (type) {
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_REPEAT

#define ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE(TYPE, NAME, NAME_LOWER, \
ENDUSER_NAME, GENERATED_NAME) \
case TYPE: \
return ENDUSER_NAME;

#define ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_REPEAT( \
TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME)

#include "generated-config/ast_layout_attribute_style_state_type.h"
}

return "unknown style state endusername";
}

/**
*
* @function generator_code_layout_attribute_style_state_type_to_name
* @brief Convert style attribute state type to name
* @params {ast_layout_attribute_style_state_type} type - Style Attribute State
* Type
* @returns {char*} name - Name
*
*/
char *generator_code_layout_attribute_style_state_type_to_name(
ast_layout_attribute_style_state_type type) {
DEBUG_ME;
switch (type) {
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_REPEAT

#define ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE(TYPE, NAME, NAME_LOWER, \
ENDUSER_NAME, GENERATED_NAME) \
case TYPE: \
return NAME;

#define ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_REPEAT( \
TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME)

#include "generated-config/ast_layout_attribute_style_state_type.h"
}

return "unknown style state name";
}

/**
*
* @function generator_code_layout_attribute_style_state_enduser_name_to_type
Expand Down Expand Up @@ -346,37 +286,3 @@ char *generator_code_layout_attribute_style_state_type_to_generated_name(

return "unknown style state generated name";
}

/**
*
* @function generator_code_layout_attribute_style_state_name_to_type
* @brief Convert style attribute state name to type
* @params {char*} name - Name
* @returns {ast_layout_attribute_style_state_type} type - Type
*
*/
ast_layout_attribute_style_state_type
generator_code_layout_attribute_style_state_name_to_type(char *name) {
DEBUG_ME;
if (name == NULL) {
return AST_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_ERROR;
}

#undef ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE
#undef ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_REPEAT

#define ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE(TYPE, NAME, NAME_LOWER, \
ENDUSER_NAME, GENERATED_NAME) \
else if (strcmp(name, NAME) == 0) { \
return TYPE; \
}

#define ADD_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_REPEAT( \
TYPE, NAME, NAME_LOWER, ENDUSER_NAME, GENERATED_NAME)

if (false) {
}
#include "generated-config/ast_layout_attribute_style_state_type.h"

return AST_LAYOUT_ATTRIBUTE_STYLE_STATE_TYPE_ERROR;
}
35 changes: 0 additions & 35 deletions src/generator_layout_style.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,6 @@
#include "memory.h"
#include "string_buffer.h"

/**
*
* @function generator_code_layout_attribute_style_state_type_to_enduser_name
* @brief Convert style attribute state type to enduser name
* @params {ast_layout_attribute_style_state_type} type - Style Attribute State
* Type
* @returns {char*} name - Name
*
*/
char *generator_code_layout_attribute_style_state_type_to_enduser_name(
ast_layout_attribute_style_state_type type);

/**
*
* @function generator_code_layout_attribute_style_state_type_to_name
* @brief Convert style attribute state type to name
* @params {ast_layout_attribute_style_state_type} type - Style Attribute State
* Type
* @returns {char*} name - Name
*
*/
char *generator_code_layout_attribute_style_state_type_to_name(
ast_layout_attribute_style_state_type type);

/**
*
* @function generator_code_layout_pseudo_elements
Expand All @@ -83,17 +59,6 @@ string_t *generator_code_layout_pseudo_elements(generator_t *generator,
ast_layout_attribute_style_state_type
generator_code_layout_attribute_style_state_enduser_name_to_type(char *name);

/**
*
* @function generator_code_layout_attribute_style_state_name_to_type
* @brief Convert style attribute state name to type
* @params {char*} name - Name
* @returns {ast_layout_attribute_style_state_type} type - Type
*
*/
ast_layout_attribute_style_state_type
generator_code_layout_attribute_style_state_name_to_type(char *name);

/**
*
* @function generator_code_layout_attribute_style_state_type_to_generated_name
Expand Down

0 comments on commit add88af

Please sign in to comment.