aboutsummaryrefslogtreecommitdiff
path: root/src/compile/enums.h
blob: 888fc294c35c18b2feefa843eab659a735651b5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// This file defines how to compile enums

#pragma once

#include "../ast.h"
#include "../environment.h"
#include "../stdlib/datatypes.h"
#include "../types.h"

Text_t compile_empty_enum(type_t *t);
Text_t compile_enum_constructors(env_t *env, ast_t *ast);
Text_t compile_enum_field_access(env_t *env, ast_t *ast);
Text_t compile_enum_header(env_t *env, ast_t *ast);
Text_t compile_enum_typeinfo(env_t *env, ast_t *ast);