bydgoszcz

simple, fast and efficient programming language
git clone git://git.kocotian.pl/bydgoszczscript.git
Log | Files | Refs | README | LICENSE

commit 394bfe868553ef7f96729c04c4fa7307fcdb5467
parent 72c27530a68811c8581a8b379cab45e27fff37d1
Author: kocotian <kocotian@kocotian.pl>
Date:   Fri, 28 May 2021 13:26:24 +0200

Inserting C ability

Diffstat:
Mcompile.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/compile.c b/compile.c @@ -423,6 +423,13 @@ tester: g_type(f, &type); str->len = (size_t)snprintf(str->data, MAX_EXPRESSIONSIZE, "(%.*s)(%.*s)", Strevalf(type), Strevalf(expr)); + } else if (!Strccmp(t->c, "wsadz")) { + t = enextToken(f, TokenIdentifier); + if (Strccmp(t->c, "c")) + errwarn(*f, 1, "unexpected identifier (expected c)"); + t = enextToken(f, TokenString); + strncpy(str->data, t->c.data + 1, t->c.len - 2); + str->len = t->c.len - 2; } else { strncpy(str->data, t->c.data, UMIN(MAX_EXPRESSIONSIZE, t->c.len)); str->len = t->c.len;