From acf91b6594d8ade64076fbeb701f286a2bd47f0f Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Sun, 14 Apr 2024 13:19:57 +0200 Subject: [PATCH] Misc update --- README.md | 2 +- lib_compiler.h | 16 ++++++---------- src/compiler/bigint.c | 7 ------- src/compiler/lib_compiler.h | 9 ++++++--- 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f423276..388a948 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ You only need to compile the build tool once. Afterwards just call `./bld.exe`. - **My priority is to improve the C user API, harden the compiler, accommodate things that I didn't foresee and stuff like that.** - I want to implement a bytecode backend (in the future) so that the language can be used like Lua. -- New features are of second priority unless they are small and important but additionally I'm considering the addition of overloaded procedures because it would greatly aid in writing macros. +- New features are of second priority unless they important. I'm considering the addition of overloaded procedures because it would greatly aid in writing macros. # Language overview diff --git a/lib_compiler.h b/lib_compiler.h index 217adcc..98eaaf0 100644 --- a/lib_compiler.h +++ b/lib_compiler.h @@ -1404,9 +1404,12 @@ LC_FUNCTION const char *LC_DeclKindToString(LC_DeclKind decl_kind); LC_FUNCTION const char *LC_TokenKindToString(LC_TokenKind token_kind); LC_FUNCTION const char *LC_TokenKindToOperator(LC_TokenKind token_kind); -// -// bigint functions -// +/* +The bigint code was written by Christoffer Lerno, he is the programmer +behind C3. He allowed me to use this code without any restrictions. Great guy! +You can check out C3 compiler: https://github.com/c3lang/c3c +He also writes very helpful blogs about compilers: https://c3.handmade.network/blog +*/ LC_FUNCTION LC_BigInt LC_Bigint_u64(uint64_t val); LC_FUNCTION uint64_t *LC_Bigint_ptr(LC_BigInt *big_int); LC_FUNCTION size_t LC_Bigint_bits_needed(LC_BigInt *big_int); @@ -3420,13 +3423,6 @@ LC_FUNCTION void LC_InternTokens(LC_Lex *x) { #undef LC_IF -/* -The bigint code was written by Christoffer Lerno, he is the programmer -behind C3. He allowed me to use this code without any restrictions. Great guy! -You can check out C3 compiler: https://github.com/c3lang/c3c -He also writes very helpful blogs about compilers: https://c3.handmade.network/blog -*/ - #ifndef malloc_arena #define malloc_arena(size) LC_PushSize(L->arena, size) #endif diff --git a/src/compiler/bigint.c b/src/compiler/bigint.c index c439c89..5952611 100644 --- a/src/compiler/bigint.c +++ b/src/compiler/bigint.c @@ -1,10 +1,3 @@ -/* -The bigint code was written by Christoffer Lerno, he is the programmer -behind C3. He allowed me to use this code without any restrictions. Great guy! -You can check out C3 compiler: https://github.com/c3lang/c3c -He also writes very helpful blogs about compilers: https://c3.handmade.network/blog -*/ - #ifndef malloc_arena #define malloc_arena(size) LC_PushSize(L->arena, size) #endif diff --git a/src/compiler/lib_compiler.h b/src/compiler/lib_compiler.h index 35ae8c1..aad69d0 100644 --- a/src/compiler/lib_compiler.h +++ b/src/compiler/lib_compiler.h @@ -1360,9 +1360,12 @@ LC_FUNCTION const char *LC_DeclKindToString(LC_DeclKind decl_kind); LC_FUNCTION const char *LC_TokenKindToString(LC_TokenKind token_kind); LC_FUNCTION const char *LC_TokenKindToOperator(LC_TokenKind token_kind); -// -// bigint functions -// +/* +The bigint code was written by Christoffer Lerno, he is the programmer +behind C3. He allowed me to use this code without any restrictions. Great guy! +You can check out C3 compiler: https://github.com/c3lang/c3c +He also writes very helpful blogs about compilers: https://c3.handmade.network/blog +*/ LC_FUNCTION LC_BigInt LC_Bigint_u64(uint64_t val); LC_FUNCTION uint64_t *LC_Bigint_ptr(LC_BigInt *big_int); LC_FUNCTION size_t LC_Bigint_bits_needed(LC_BigInt *big_int);