Tests started. Enabling constant declaration
This commit is contained in:
21
main.cpp
Normal file
21
main.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user