engine/source/preprocessorlib/pp_parser.c
/**
 * Allocates a subparser, used for including files and expanding macros.
 * @param parent the parent parser of this subparser
 * @param filename the name of the file to parse
 * @param sourceCode the source code to parse, in string form
 */
Allocates a subparser, used for including files and expanding macros.
@param parent the parent parser of this subparser
@param filename the name of the file to parse
@param sourceCode the source code to parse, in string form
Allocates a subparser used for including files and expanding macros . @param parent the parent parser of this subparser @param filename the name of the file to parse @param sourceCode the source code to parse in string form
pp_parser *pp_parser_alloc(pp_parser *parent, const char *filename, char *sourceCode, pp_parser_type type)
{
    pp_parser *self = malloc(sizeof(pp_parser));
    TEXTPOS initialPos = {1, 0};
    pp_parser_init(self, parent->ctx, filename, sourceCode, initialPos);
    self->type = type;
    self->parent = parent;
    parent->child = self;
    return self;
}
pp_parser * pp_parser_alloc ( pp_parser * parent , const char * filename , char * sourceCode , pp_parser_type type ) { pp_parser * self = malloc ( sizeof ( pp_parser ) ) ; TEXTPOS initialPos = { 1 , 0 } ; pp_parser_init ( self , parent -> ctx , filename , sourceCode , initialPos ) ; self -> type = type ; self -> parent = parent ; parent -> child = self ; return self ; }
Allocates a subparser, used for including files and expanding macros.
Allocates a subparser used for including files and expanding macros .