#ifndef SK_NODE_H #define SK_NODE_H #include "commons.h" #define NODE_KIND(G) \ G(NODE_ROOT), \ G(NODE_INT), \ G(NODE_ADD), G(NODE_SUB), G(NODE_MUL),\ G(NODE_DIV), G(NODE_POW), G(NODE_MOD),\ G(NODE_USUB), G(NODE_ASSERT_EQ), \ G(NODE_BOOL), G(NODE_AND), G(NODE_OR), \ G(NODE_NOT) SK_ENUM_H(NodeKind, NODE_KIND); struct node { NodeKind kind; struct vec children; struct token* token; }; void node_init(struct node* self, NodeKind kind, struct token* token); void node_free(struct node* self); void node_push_new_child(struct node* self, struct node* child); void node_str(struct node* self, struct str* dest); #endif