print funtion added, not tested

This commit is contained in:
2026-03-25 06:59:52 -06:00
parent 17be815ed0
commit f11b6f8c12
4 changed files with 50 additions and 0 deletions

View File

@@ -74,5 +74,6 @@ LexerErr tokenize_number(const char* input, size_t *offset, ASTNode *out);
LexerErr string_to_integer(const char buf[], int64_t *number);
bool isoperator(int c);
Operator char_to_operator(int c);
char operator_to_char(Operator op);
#endif // !LEXER_H

View File

@@ -19,5 +19,9 @@ ASTNode *led(ASTNodeSlice *slice, size_t right_precedence);
uint8_t node_lbp(ASTNode node);
uint8_t node_rbp(ASTNode node);
AST parse(ASTNodeArray *arr);
ASTNode *parse_expr(ASTNodeSlice *slice, uint8_t min_bp);
void print_AST(AST tree);
void print_node(ASTNode *node, int depth);