src/onyxparser.c
// NOTE: This returns a void* so I don't need to cast it everytime I use it
This returns a void* so I don't need to cast it everytime I use it
This returns a void * so I don ' t need to cast it everytime I use it
void* onyx_ast_node_new(bh_allocator alloc, i32 size, AstKind kind) {
    void* node = bh_alloc(alloc, size);
    memset(node, 0, size);
    *(AstKind *) node = kind;
    return node;
}
void * onyx_ast_node_new ( bh_allocator alloc , i32 size , AstKind kind ) { void * node = bh_alloc ( alloc , size ) ; memset ( node , 0 , size ) ; * ( AstKind * ) node = kind ; return node ; }
NOTE: This returns a void* so I don't need to cast it everytime I use it
NOTE : This returns a void * so I don ' t need to cast it everytime I use it