aboutsummaryrefslogtreecommitdiff
path: root/src/compile/promotions.h
blob: ea6a6742d0c64a015993ce5e55fa2550579f9716 (plain)
1
2
3
4
5
6
7
8
9
10
// This file defines how to do type promotions during compilation

#pragma once

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

bool promote(env_t *env, ast_t *ast, Text_t *code, type_t *actual, type_t *needed);
Text_t compile_to_type(env_t *env, ast_t *ast, type_t *t);