refactor: evaluator separated into evaluate bin and un
Is nicer this way, also made it more beautiful to look at and therefor to understand.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#ifndef EVALUATOR_H
|
||||
#define EVALUATOR_H
|
||||
|
||||
#include "lexer.h"
|
||||
#include "parser.h"
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -20,6 +19,9 @@ typedef struct {
|
||||
};
|
||||
} EvaluatorResult;
|
||||
|
||||
EvaluatorResult evaluate_binary(Node *tree);
|
||||
EvaluatorResult evaluate_unary(Node *tree);
|
||||
|
||||
EvaluatorResult evaluate(ParserResult context);
|
||||
EvaluatorResult evaluate_tree(Node *tree);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user