This website requires JavaScript.
Explore
Help
Sign In
patrick
/
foliage-rs
Watch
1
Star
0
Fork
0
You've already forked foliage-rs
Code
Issues
Pull Requests
Releases
Wiki
Activity
foliage-rs
/
src
/
format.rs
5 lines
51 B
Rust
Raw
Normal View
History
Unescape
Escape
Split formatting functionality into two files
2020-03-30 04:27:58 +02:00
mod
formulas
;
mod
terms
;
Fix formatting of binary operations The precedence rules of binary operations are a bit trickier than expected. The fact that a parent and a child term have the same precedence level doesn’t automatically mean that parentheses can be omitted. This is the case, for example, with a - (b + c) While addition and subtraction have the same precedence level, the parenthesis cannot be omitted. In general, this happens on the right- hand side of the subtraction, division, and modulo operators if the right-hand side has the same precedence level. This patch fixes the output of binary operations accordingly.
2020-03-30 05:57:56 +02:00
Split formatting functionality into two files
2020-03-30 04:27:58 +02:00
pub
(
crate
)
use
terms
::
*
;
Reference in New Issue
Copy Permalink