From 632fbfdba2dd05c5e07d9182a36859619c6e6108 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 27 Jan 2024 14:26:51 +0900 Subject: [PATCH] WIP for #b[ --- lang.txt | 6 ++++++ lib/read.c | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/lang.txt b/lang.txt index 7e6f1b5..242b8d8 100644 --- a/lang.txt +++ b/lang.txt @@ -26,6 +26,12 @@ #b[ ] byte array?? #[ ] normal array? + allow b'X' or 'X' in byte array in #b[] notation? + + signal handling + + full oop + make basic branded types to an object if possible. for example (#[10 20]:at 1) diff --git a/lib/read.c b/lib/read.c index 8e084e7..64455df 100644 --- a/lib/read.c +++ b/lib/read.c @@ -2172,6 +2172,29 @@ not_consumed: return 0; } +static int flx_hmarked_b (hcl_t* hcl, hcl_ooci_t c) +{ +#if 0 + hcl_flx_hb_t* hb = FLX_HB(hcl); + + if (c == '[') + { + } + else + { + init_flx_hn (FLX_HN(hcl), HCL_TOK_RADNUMLIT, HCL_SYNERR_NUMLIT, 2); + FEED_CONTINUE (hcl, HCL_FLX_HMARKED_NUMBER); + goto not_consumed; + } +#endif + +consumed: + return 1; + +not_consumed: + return 0; +} + static int flx_hmarked_number (hcl_t* hcl, hcl_ooci_t c) { hcl_flx_hn_t* rn = FLX_HN(hcl);