summary refs log tree commit diff
path: root/include/cccl.h
diff options
context:
space:
mode:
authorNakidai <plaza521@inbox.ru>2024-07-08 00:12:21 +0300
committerNakidai <plaza521@inbox.ru>2024-07-08 00:12:21 +0300
commitf4d71aa4a0f4d71104736e3d254d4b9a556e6170 (patch)
treefcce82a0dccc48f2ed43fad35ae09bbd369678f9 /include/cccl.h
parentcea648180f5218dfe0e8c0038d9bb6535e2eefcd (diff)
download3cl-f4d71aa4a0f4d71104736e3d254d4b9a556e6170.tar.gz
3cl-f4d71aa4a0f4d71104736e3d254d4b9a556e6170.zip
Add part of syntax with brackets
Implemented if and infinity loop. They don't work right, tho :<
Diffstat (limited to 'include/cccl.h')
-rw-r--r--include/cccl.h10
1 files changed, 8 insertions, 2 deletions
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 */