How to parse binary operation syntax?

Hi there, sorry for not asking about Rust itself. :stuck_out_tongue:
I wonder how to parse binary operation syntax. I've learnt the usage of syn but cannot figure out how syn does, its codes are too much. Expressions like 1 + 2 * (3 / 4), I want to parse them into ASTs, including the reorder. That is, multiplication and division take precedence over addition and subtraction.

I wrote a couple of tutorial about parsing, you might find them useful:


Thanks, let me take a look

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.