Login
7 branches 0 tags
Ben (X13/Arch) Moved some things from bin/main.c into separate files dc5e1fe 4 years ago 92 Commits
nujel / lib / type-system.h
#pragma once
#include "nujel.h"

int         castToInt   (const lVal *v, int         fallback);
float       castToFloat (const lVal *v, float       fallback);
vec         castToVec   (const lVal *v, vec         fallback);
bool        castToBool  (const lVal *v);
const char *castToString(const lVal *v, const char *fallback);

lVal *lCast             (lClosure *c, lVal *v, lType t);
lVal *lCastAuto         (lClosure *c, lVal *v);
lVal *lCastSpecific     (lClosure *c, lVal *v, const lType type);
lVal *lCastNumeric      (lClosure *c, lVal *v);
lType lTypecast         (const lType a, const lType b);
lType lTypecastList     (lVal *a);

void  lOperationsTypeSystem(lClosure *c);