Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

enum CRStatus cr_tknzr_peek_char ( CRTknzr *  a_this,
guint32 *  a_char 
)

Peeks a char from the parser input stream. To "peek a char" means reads the next char without consuming it. Subsequent calls to this function return the same char.

Parameters:
a_this the current instance of CRTknzr.
a_char out parameter. The peeked char uppon successfull completion.
Returns:
CR_OK upon successfull completion, an error code otherwise.

Definition at line 1750 of file cr-tknzr.c.

References cr_input_peek_char(), cr_input_set_cur_pos(), and cr_token_destroy().

Referenced by cr_declaration_parse_list_from_buf(), cr_parser_parse_import(), cr_parser_parse_ruleset(), cr_parser_parse_selector(), cr_tknzr_parse_num(), and cr_tknzr_parse_w().

{
        g_return_val_if_fail (a_this && PRIVATE (a_this)
                              && PRIVATE (a_this)->input
                              && a_char, CR_BAD_PARAM_ERROR);

        if (PRIVATE (a_this)->token_cache) {
                cr_input_set_cur_pos (PRIVATE (a_this)->input,
                                      &PRIVATE (a_this)->prev_pos);
                cr_token_destroy (PRIVATE (a_this)->token_cache);
                PRIVATE (a_this)->token_cache = NULL;
        }

        return cr_input_peek_char (PRIVATE (a_this)->input, a_char);
}


Generated by  Doxygen 1.6.0   Back to index