From f4d71aa4a0f4d71104736e3d254d4b9a556e6170 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Mon, 8 Jul 2024 00:12:21 +0300 Subject: Add part of syntax with brackets Implemented if and infinity loop. They don't work right, tho :< --- include/cccl.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/cccl.h') diff --git a/include/cccl.h b/include/cccl.h index 50b7d64..119adf5 100644 --- a/include/cccl.h +++ b/include/cccl.h @@ -21,15 +21,21 @@ typedef struct cccl_procpair typedef struct cccl_pointer { i32 value; - i32 meta; + i32 meta; } cccl_pointer; +typedef struct cccl_brpair +{ + i32 pointer; + s8 bracket; +} cccl_brpair; + typedef struct cccl { cccl_varpair *variables; /* Array with variables */ cccl_procpair *procedures; /* Array with procedures */ i16 *stack; /* User stack */ - s8 *br_stack; /* Stack for brackets */ + cccl_brpair *br_stack; /* Stack for brackets */ cccl_varpair **lv_stack; /* Local variable stack */ cccl_pointer *ep_stack; /* Call stack */ i32 ep; /* Pointer to current symbol */ -- cgit 1.4.1