src/core/config/parser.c
/**
 * Here we will handle the parsing of a generic value.
 */
Here we will handle the parsing of a generic value.
Here we will handle the parsing of a generic value .
struct config_value *parser_parse_value(struct parser *parser, char *value)
{
        switch (char_to_token(value[0])) {
        case ALPHA_CHAR:
                return parser_parse_boolean(parser, value);
        case ARRAY_START:
                return parser_parse_array(parser, value);
        case NUMERIC_CHAR:
                return parser_parse_number(parser, value);
        case QUOTE:
                return parser_parse_string(parser, value);
        case VARIABLE_START:
                return parser_parse_variable(parser, value);
        default:
                return NULL;
        }
}
struct config_value * parser_parse_value ( struct parser * parser , char * value ) { switch ( char_to_token ( value [ 0 ] ) ) { case ALPHA_CHAR : return parser_parse_boolean ( parser , value ) ; case ARRAY_START : return parser_parse_array ( parser , value ) ; case NUMERIC_CHAR : return parser_parse_number ( parser , value ) ; case QUOTE : return parser_parse_string ( parser , value ) ; case VARIABLE_START : return parser_parse_variable ( parser , value ) ; default : return NULL ; } }
Here we will handle the parsing of a generic value.
Here we will handle the parsing of a generic value .