It works, basic but works, need to move out logic to places, like ASTNode array shouldn't be on the lexer or future logic for fractions and error handling in the evaluator. Just the things at the top of my head

This commit is contained in:
2026-03-25 11:30:12 -06:00
parent 845673fb0e
commit 92d142b9cf
5 changed files with 67 additions and 28 deletions

View File

@@ -0,0 +1,9 @@
#ifndef EVALUATOR_H
#define EVALUATOR_H
#include "lexer.h"
#include <stdint.h>
uint64_t evaluate(ASTNode *tree);
#endif // !EVALUATOR_H

View File

@@ -1,3 +1,6 @@
#ifndef PARSER_H
#define PARSER_H
#include "lexer.h"
#include <stdint.h>
@@ -23,3 +26,4 @@ uint8_t node_rbp(ASTNode node);
AST parse(ASTNodeArray *arr);
ASTNode *parse_expr(ASTNodeSlice *slice, uint8_t min_bp);
#endif // !PARSER_H