summaryrefslogtreecommitdiff
path: root/comp/lucas-standen-NEA/code/global/util.h
blob: dc59460fde19b0b608dd934252607bddf564ad0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <errno.h>
#include <error.h>
#include <ctype.h>


// functions for user
void Die(); // brings down the program
void *CheckedMalloc(long size); // malloc checked with autofree
void *CheckedRealloc(void *out, long size); // realloc checked with autofree

literal *giveType(char *tok); // gives a string a type

// gives strings types
I64 *isNum(char *str); 
Float *isFloat(char *str);
Char *isChar(char *str);
literal *isArr(char *str);
Vdef *isVdef(char *str);