#pragma once typedef struct Expr Expr; typedef enum Expr_Kind{ EK_None, EK_Atom, EK_Unary, EK_Binary, EK_Ternary, EK_Cast, EK_List, EK_Call, EK_Index, } Expr_Kind; struct Expr { Expr_Kind kind; Token *token; Expr *next; union { struct { AST_Node *type; Expr* expr; } cast; struct { Expr *first; Expr *last; } list; struct { Expr *atom; Expr *list; } call; struct { Expr *atom; Expr *index; } index; struct { Expr* expr; } unary; struct { Expr* left; Expr* right; } binary; struct { Expr* cond; Expr* on_true; Expr* on_false; } ternary; }; };