WONKY



LOG | FILES | OVERVIEW


#ifndef WONKY_MACRO_C
#define WONKY_MACRO_C WONKY_MACRO_C
#include <macro.h>

struct normal_define_directive* get_normal_define_directive(struct identifier *id)
{
	struct normal_define_directive *ret;
	ret=wonky_malloc(sizeof(struct normal_define_directive));
	ret->id=id;
	ret->replacement_tokens=wonky_malloc(sizeof(struct Queue));
	Queue_Init(ret->replacement_tokens);

	return ret;
}
struct functionlike_define_directive* get_functionlike_define_directive(struct identifier *id)
{
	struct functionlike_define_directive *ret;
	ret=wonky_malloc(sizeof(struct functionlike_define_directive));
	ret->id=id;
	ret->arguments=wonky_malloc(sizeof(struct Queue));
	Queue_Init(ret->arguments);
	ret->replacement_tokens=wonky_malloc(sizeof(struct Queue));
	Queue_Init(ret->replacement_tokens);
	ret->is_variadic=0;
	return ret;
}
struct functionlike_define_directive_argument* get_functionlike_define_directive_argument(struct token_functionlike_define_directive *belongs_to)
{
	struct functionlike_define_directive_argument *ret;
	ret=wonky_malloc(sizeof(struct functionlike_define_directive_argument));
	ret->belongs_to=belongs_to;
	ret->first_in_argument_substitution_tokens=NULL;
	ret->number_of_substitution_tokens=0;

	return ret;
}
#warning there is no check for duplicate ids in function like macro id list
#warning functionlike macro '(' after the name of the macro should be glued to id, because otherwise we cant differentiate between '(' in the macro and the begining of the argument list. Currently this is not parsed correctly!
#endif