20 lines
392 B
C
20 lines
392 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
#include "parser.h"
|
|
#include "parser-structure.h"
|
|
|
|
// Statements
|
|
PARSER* mkparser(TOKEN* tokens, char* file) {
|
|
PARSER* parser = (PARSER*)malloc(sizeof(PARSER));
|
|
parser->tokens = tokens;
|
|
parser->current = tokens;
|
|
parser->file = file;
|
|
return parser;
|
|
}
|
|
|
|
void parse(PARSER* p) {
|
|
p->output = parseclasses(p);
|
|
}
|