src/core/config/parser.c
/**
 * Increment the parser position one step. If the current position of
 * the parser is a new line make sure to update the column and line
 * numbers to represent the new location
 */
Increment the parser position one step. If the current position of
the parser is a new line make sure to update the column and line
numbers to represent the new location
Increment the parser position one step . If the current position of the parser is a new line make sure to update the column and line numbers to represent the new location
void parser_increment(struct parser *parser)
{
        if (parser->pos > parser->buffer_size) {
                return;
        }
        if (parser->buffer[parser->pos] == '\n') {
                ++parser->line_num;
                parser->col_num = 1;
        } else {
                ++parser->col_num;
        }
        ++parser->pos;
}
void parser_increment ( struct parser * parser ) { if ( parser -> pos > parser -> buffer_size ) { return ; } if ( parser -> buffer [ parser -> pos ] == ' \n ' ) { ++ parser -> line_num ; parser -> col_num = 1 ; } else { ++ parser -> col_num ; } ++ parser -> pos ; }
Increment the parser position one step.
Increment the parser position one step .