Backup, Decl,Type parsing enum,structs etc.
This commit is contained in:
7
main.c
7
main.c
@@ -11,6 +11,10 @@
|
||||
#include "expr.h"
|
||||
#include "decl.h"
|
||||
|
||||
global FILE *global_output_file;
|
||||
#define lex_print(...) fprintf(global_output_file, __VA_ARGS__)
|
||||
#define lex_new_line() lex_print("\n")
|
||||
|
||||
#include "common.c"
|
||||
#include "memory.c"
|
||||
#include "parser.c"
|
||||
@@ -99,6 +103,9 @@ parser_test(){
|
||||
|
||||
String decls[] = {
|
||||
lit("enum Thing{ Thing_1, Thing_2 = 2}"),
|
||||
lit("global S64 *variable[10] = 10"),
|
||||
lit("global S64 (*variable)(S64 thing) = 10"),
|
||||
lit("struct Thing{ S64 a; U64 *b; union A{ S64 thing; }; }"),
|
||||
};
|
||||
for(S64 i = 0; i < buff_cap(decls); i++){
|
||||
parser_lex_stream(&p, decls[i], lit("File"));
|
||||
|
||||
Reference in New Issue
Block a user