Operator overloads for unary expressions

This commit is contained in:
Krzosa Karol
2022-09-29 17:36:15 +02:00
parent 9ee22abbd2
commit 37489b2730
6 changed files with 61 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ struct Ast_File;
struct Ast_Module;
struct Ast_Type;
struct Ast;
struct Ast_Expr;
enum Token_Kind{
TK_End,
@@ -95,7 +96,6 @@ enum Token_Kind{
TK_Pointer = TK_Mul,
TK_Dereference = TK_BitAnd,
OPEN_SCOPE = 128,
CLOSE_SCOPE,
SAME_SCOPE,
@@ -122,7 +122,6 @@ struct Token{
S32 line;
U8 *line_begin;
};
global Token null_token;
struct Lex_Stream{
String stream;
@@ -197,4 +196,5 @@ function String compile_to_c_code();
function Ast_Module *ast_module(Token *pos, Intern_String filename);
function void insert_builtin_types_into_scope(Ast_Scope *p);
function void insert_into_scope(Ast_Scope *scope, Ast_Decl *decl);
function Ast_Type *type_incomplete(Ast *ast);
function Ast_Type *type_incomplete(Ast *ast);
function Ast_Expr *parse_expr(S64 minbp = 0);