Handle nesting and subtraction in reader

This commit is contained in:
2024-10-24 17:35:42 +01:00
parent 79494cd0ba
commit d4855813a2
3 changed files with 76 additions and 7 deletions

View File

@@ -4,10 +4,10 @@
#include <stdbool.h>
typedef enum {
OPERATOR_ADD,
OPERATOR_SUBTRACT,
OPERATOR_MULTIPLY,
OPERATOR_DIVIDE,
OPERATOR_ADD = 0,
OPERATOR_SUBTRACT = 1,
OPERATOR_MULTIPLY = 2,
OPERATOR_DIVIDE = 3,
} operator_t;
struct _expression_t;