Foreign variables, exporting some of the info to the c program, compile errors though

This commit is contained in:
Krzosa Karol
2022-06-18 16:01:05 +02:00
parent 0ed4f62557
commit e63dc0322a
7 changed files with 47 additions and 11 deletions

View File

@@ -781,6 +781,9 @@ parse_decl(B32 is_global){
else if(token_match(TK_Identifier, TK_Colon)){
Ast_Expr *typespec = parse_expr();
Ast_Expr *expr = parse_assign_expr();
if(token_match_pound(intern_foreign))
set_flag(flags, AST_FOREIGN);
result = ast_var(tname, typespec, tname->intern_val, expr);
}