1
0
Fork 0

Remove unnecessary code

This commit is contained in:
Alex Kotov 2023-05-07 17:39:07 +04:00
parent e225caea00
commit 5b2c5af17f
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 0 additions and 27 deletions

View File

@ -16,32 +16,6 @@ static struct Object *eval_list(
struct Object *environment
);
struct Object *eval_str(
const char *const str,
struct Object *const environment
) {
assert(str);
Tokens tokens = Tokens_new();
assert(tokens);
Lexer lexer = Lexer_new(tokens);
assert(lexer);
for (const char *chr = str; *chr; ++chr) {
Lexer_lex(lexer, *chr);
}
Lexer_lex(lexer, '\n');
LEXER_DELETE(lexer);
assert(Tokens_top(tokens));
struct Object *const program = parse(tokens);
TOKENS_DELETE(tokens);
return eval(program, environment);
}
struct Object *eval(
struct Object *const object,
struct Object *const environment

View File

@ -3,7 +3,6 @@
#include "object.h"
struct Object *eval_str(const char * str, struct Object *environment);
struct Object *eval(struct Object *object, struct Object *environment);
#endif