jack-compiler/parser/parser.c

15 lines
329 B
C
Raw Normal View History

2020-12-14 14:12:20 -05:00
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "parser.h"
2020-12-22 11:18:54 -05:00
#include "parser-structure.h"
2020-12-14 14:12:20 -05:00
2020-12-29 19:27:48 -05:00
CLASS* parse(TOKEN* tokens, char* file) {
2020-12-14 14:12:20 -05:00
PARSER* parser = (PARSER*)malloc(sizeof(PARSER));
parser->tokens = tokens;
parser->current = tokens;
parser->file = file;
2020-12-29 19:27:48 -05:00
return parseclass(parser);
2020-12-14 14:12:20 -05:00
}