*/
+/* Node Variants
+
+ <TYP> <VAL> Literal Value
+ <IDENT> <ID> <VER> Identifier Reference
+ <OP> <D> <L> <R> Binary Operation
+ <OP> <D> <R> Unary Operation
+ <RET> <V?> <B> Procedure Return
+ <IF> <C> <B1> <B2> If Statement
+ <BLK> <PL> <H> <T> Basic Block
+
+*/
+#if 0
+AstNode* ast_bool(AstNode* block, bool val);
+AstNode* ast_int(AstNode* block, long long val);
+AstNode* ast_real(AstNode* block, double val);
+AstNode* ast_ident(AstNode* block, Parser* p, long long index);
+AstNode* ast_op(AstNode* block, int op, AstNode* left, AstNode* right);
+AstNode* ast_store(AstNode* block, AstNode* dest, AstNode* offset, AstNode* value);
+AstNode* ast_return(AstNode* block, AstNode* expr, AstNode* dest);
+AstNode* ast_if(AstNode* block, AstNode* cond, AstNode* dest1, AstNode* dest2);
+// while
+// foreach
+// case
+
+/* identifier references and literal values */
typedef struct {
AstNodeHeader hdr;
union {
long long tag;
} AstValue;
+typedef struct {
+ AstNodeHeader hdr;
+ AstNode* dest;
+ AstNode* left;
+ AstNode* right;
+} AstOp;
+
+typedef struct {
+ AstNodeHeader hdr;
+ AstNode* head;
+ AstNode* tail;
+} AstBlock;
+
+#else
+
+typedef struct {
+ AstNodeHeader hdr;
+ union {
+ long long i;
+ double f;
+ char* s;
+ } val;
+ long long tag;
+} AstValue;
+
+#endif
+
bool ast_isconst(AstNode* node)
{
bool ret;