Updated scope code and variable tracking. Added trailing body macros.

This commit is contained in:
Christoffer Lerno
2021-06-09 17:12:48 +02:00
committed by Christoffer Lerno
parent bf8e665120
commit dafe0e6fb6
21 changed files with 1249 additions and 778 deletions

View File

@@ -330,6 +330,8 @@ static inline void* _expand(void *vec, size_t element_size)
#define CONCAT(a, b) CONCAT_INNER(a, b)
#define VECEACH(_vec, _index) \
for (unsigned _index = 0, CONCAT(__vecsize_, __LINE__) = vec_size(_vec); _index < CONCAT(__vecsize_, __LINE__); _index++)
#define foreach(_vec, _index) \
for (unsigned _index = 0, CONCAT(__vecsize_, __LINE__) = vec_size(_vec); _index < CONCAT(__vecsize_, __LINE__); _index++)
#define VECNEW(_type, _capacity) ((_type *)(_vec_new(sizeof(_type), _capacity) + 1))