diff --git a/lang/main.c b/lang/main.c index 7dd85d3..059db8b 100644 --- a/lang/main.c +++ b/lang/main.c @@ -6,8 +6,6 @@ int lang_main(void) { printf("Hello world!\n"); - printf("symb %i\n", find_symbol("a")); - printf("symb %i\n", find_symbol("b")); struct object *numA = number_create(5); struct object *numB = number_create(3); struct object *args[] = {numB}; diff --git a/lang/object.h b/lang/object.h index c22728a..2cf37c9 100644 --- a/lang/object.h +++ b/lang/object.h @@ -4,7 +4,6 @@ #ifndef OBJECT_H #define OBJECT_H -#include "symbol.h" #include // Forward declare the class as we need it in object diff --git a/lang/symbol.c b/lang/symbol.c deleted file mode 100644 index 07893d1..0000000 --- a/lang/symbol.c +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -// Copyright (c) 2023 John Watts and the LuminaSensum contributors - -#include "symbol.h" -#include - -// FNV-1a Algorithm from http://www.isthe.com/chongo/tech/comp/fnv/ -// Thanks for releasing it to the public domain :) -uint32_t fnv32a_text(unsigned char *text) { - uint32_t hash = (uint32_t)0x811c9dc5; - while (*text) { - hash ^= (uint32_t)*text++; - hash *= (uint32_t)0x01000193; - } - return hash; -} - -symbol find_symbol(char *name) { return fnv32a_text((unsigned char *)name); } diff --git a/lang/symbol.h b/lang/symbol.h deleted file mode 100644 index 291a7e7..0000000 --- a/lang/symbol.h +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: MIT -// Copyright (c) 2023 John Watts and the LuminaSensum contributors - -#ifndef SYMBOL_H -#define SYMBOL_H - -// Symbols are integers with unique values -typedef int symbol; - -// Find a unique value associated with the symbol's name -symbol find_symbol(char *name); - -#endif