Tests started. Enabling constant declaration

This commit is contained in:
2021-05-03 18:49:26 +02:00
parent 38e3bb1630
commit 36caa0b651
7 changed files with 85 additions and 67 deletions

21
main.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "parser.h"
#include <stdio.h>
#include <stdlib.h>
static unsigned char mem[65536];
int main(void) {
FILE *f = fopen("test.vb", "rb");
fseek(f, 0, SEEK_END);
long fsize = ftell(f);
fseek(f, 0, SEEK_SET); //same as rewind(f);
char *program = (char*)malloc(fsize + 1);
fread(program, fsize, 1, f);
fclose(f);
program[fsize] = 0;
parser_parse(program, mem);
free(program);
return 0;
}