print funtion added, not tested
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user