Convert tables to STRINGARRAY
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include <string.h>
|
||||
#include "parser.h"
|
||||
|
||||
#define mkstrlist(name, array) STRINGARRAY name = { .items = array, .size = strcount(array) }
|
||||
#define next(parser) parser->current = p->current->next
|
||||
#define anchorparser(parser) p->checkpoint = p->current
|
||||
#define rewindparser(parser) p->current = p->checkpoint
|
||||
|
@@ -111,7 +111,12 @@ SUBROUTDEC* parsesubroutdec(PARSER* p) {
|
||||
SUBROUTDEC* subroutdec = (SUBROUTDEC*)malloc(sizeof(SUBROUTDEC));
|
||||
subroutdec->subroutclass = subroutclass;
|
||||
|
||||
subroutdec->type = parsetype(p);
|
||||
if(differs(p, "void"))
|
||||
subroutdec->type = parsetype(p);
|
||||
else {
|
||||
subroutdec->type = p->current->token;
|
||||
next(p);
|
||||
}
|
||||
|
||||
subroutdec->debug = getdebug(p);
|
||||
|
||||
|
Reference in New Issue
Block a user