src/tokeniser/tokeniser.c
hubbub_error emit_current_chars(hubbub_tokeniser *tokeniser)
{
	hubbub_token token;
	size_t len;
	const uint8_t *cptr = NULL;
	parserutils_error error;

	/* Calling this with nothing to output is a probable bug */
	assert(tokeniser->context.pending > 0);

	error = parserutils_inputstream_peek(tokeniser->input, 0, &cptr, &len);
	if (error != PARSERUTILS_OK)
		return hubbub_error_from_parserutils_error(error);

	token.type = HUBBUB_TOKEN_CHARACTER;
	token.data.character.ptr = cptr;
	token.data.character.len = tokeniser->context.pending;

	return hubbub_tokeniser_emit_token(tokeniser, &token);
}
/**
 * Emit the current pending characters being stored in the tokeniser context.
 *
 * \param tokeniser	Tokeniser instance
 * \return	true
 */
Emit the current pending characters being stored in the tokeniser context.
\param tokeniser     Tokeniser instance
\return      true
Emit the current pending characters being stored in the tokeniser context . \ param tokeniser Tokeniser instance \ return true
hubbub_error emit_current_chars(hubbub_tokeniser *tokeniser)
{
	hubbub_token token;
	size_t len;
	const uint8_t *cptr = NULL;
	parserutils_error error;
	assert(tokeniser->context.pending > 0);
	error = parserutils_inputstream_peek(tokeniser->input, 0, &cptr, &len);
	if (error != PARSERUTILS_OK)
		return hubbub_error_from_parserutils_error(error);
	token.type = HUBBUB_TOKEN_CHARACTER;
	token.data.character.ptr = cptr;
	token.data.character.len = tokeniser->context.pending;
	return hubbub_tokeniser_emit_token(tokeniser, &token);
}
hubbub_error emit_current_chars ( hubbub_tokeniser * tokeniser ) { hubbub_token token ; size_t len ; const uint8_t * cptr = NULL ; parserutils_error error ; assert ( tokeniser -> context . pending > 0 ) ; error = parserutils_inputstream_peek ( tokeniser -> input , 0 , & cptr , & len ) ; if ( error != PARSERUTILS_OK ) return hubbub_error_from_parserutils_error ( error ) ; token . type = HUBBUB_TOKEN_CHARACTER ; token . data . character . ptr = cptr ; token . data . character . len = tokeniser -> context . pending ; return hubbub_tokeniser_emit_token ( tokeniser , & token ) ; }
Emit the current pending characters being stored in the tokeniser context.
Emit the current pending characters being stored in the tokeniser context .
/* Calling this with nothing to output is a probable bug */