Logo Search packages:      
Sourcecode: inkscape version File versions

enum CRStatus cr_parser_try_to_skip_spaces_and_comments ( CRParser a_this  ) 

Same as cr_parser_try_to_skip_spaces() but this one skips spaces and comments.

Parameters:
a_this the current instance of CRParser.
Returns:
CR_OK upon successfull completion, an error code otherwise.

Definition at line 613 of file cr-parser.c.

References cr_tknzr_get_next_token(), cr_token_destroy(), and _CRToken::type.

Referenced by cr_declaration_parse_from_buf(), cr_declaration_parse_list_from_buf(), cr_parser_parse_atrule_core(), cr_parser_parse_attribute_selector(), cr_parser_parse_block_core(), cr_parser_parse_charset(), cr_parser_parse_declaration(), cr_parser_parse_expr(), cr_parser_parse_font_face(), cr_parser_parse_function(), cr_parser_parse_import(), cr_parser_parse_media(), cr_parser_parse_prio(), cr_parser_parse_property(), cr_parser_parse_ruleset(), cr_parser_parse_ruleset_core(), cr_parser_parse_selector(), cr_parser_parse_simple_selector(), cr_parser_parse_simple_sels(), cr_parser_parse_stylesheet(), cr_parser_parse_stylesheet_core(), cr_parser_parse_term(), cr_parser_parse_value_core(), cr_statement_at_charset_rule_parse_from_buf(), cr_statement_at_import_rule_parse_from_buf(), cr_statement_at_media_rule_parse_from_buf(), cr_statement_at_page_rule_parse_from_buf(), cr_statement_font_face_rule_parse_from_buf(), cr_statement_ruleset_parse_from_buf(), and cr_term_parse_expression_from_buf().

{
        enum CRStatus status = CR_ERROR;
        CRToken *token = NULL;

        g_return_val_if_fail (a_this && PRIVATE (a_this)
                              && PRIVATE (a_this)->tknzr, CR_BAD_PARAM_ERROR);
        do {
                if (token) {
                        cr_token_destroy (token);
                        token = NULL;
                }

                status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr,
                                                  &token);
                if (status != CR_OK)
                        goto error;
        }
        while ((token != NULL)
               && (token->type == COMMENT_TK || token->type == S_TK));

        cr_tknzr_unget_token (PRIVATE (a_this)->tknzr, token);

        return status;

      error:

        if (token) {
                cr_token_destroy (token);
                token = NULL;
        }

        return status;
}


Generated by  Doxygen 1.6.0   Back to index