Can call the compiler from command line with argument

This commit is contained in:
Krzosa Karol
2022-06-07 15:27:18 +02:00
parent 1a67fe3402
commit 44d26d6939
6 changed files with 40 additions and 18 deletions

View File

@@ -96,6 +96,7 @@ gen_expr(Ast_Expr *ast){
CASE(INDEX, Index){
gen("(");
gen_expr(node->expr);
gen("[");
gen_expr(node->index);
gen("]");
@@ -426,7 +427,6 @@ compile_string(String filecontent, String filename = "default_name"_s){
pctx->resolving_package = result;
F64 parse_end = os_time();
gen(R"==(
#include <stdint.h>
#include <stdio.h>
@@ -448,6 +448,11 @@ typedef float F32;
typedef double F64;
typedef S32 Bool;
typedef struct Slice{
S64 len;
void *data;
}Slice;
typedef struct String{
U8 *str;
S64 len;