First of all, thank you for the great work on this project. I’ve been reading through the code and found that tokens_to_operator_tree works very well as it is.
I have a small suggestion to discuss: would you consider refactoring this function using Pratt parsing (top-down operator precedence parsing)? I think it could make the code easier to understand and maintain, especially when dealing with operator precedence and associativity.
I’d be happy to take this on and implement the refactoring myself, if you’re open to it. Of course, the existing behavior would be kept exactly the same, and I’ll make sure to add tests.
Looking forward to your thoughts. Thanks again for your work!
First of all, thank you for the great work on this project. I’ve been reading through the code and found that tokens_to_operator_tree works very well as it is.
I have a small suggestion to discuss: would you consider refactoring this function using Pratt parsing (top-down operator precedence parsing)? I think it could make the code easier to understand and maintain, especially when dealing with operator precedence and associativity.
I’d be happy to take this on and implement the refactoring myself, if you’re open to it. Of course, the existing behavior would be kept exactly the same, and I’ll make sure to add tests.
Looking forward to your thoughts. Thanks again for your work!