ISibboI / evalexpr

A powerful expression evaluation crate 🦀.
GNU Affero General Public License v3.0
320 stars 52 forks source link

Better node display #137

Open benwr opened 1 year ago

benwr commented 1 year ago

Change the Display instance for Node. Previously it printed a simple pre-order traversal, which was sometimes ambiguous because e.g. for nested n-ary functions it wasn't clear which things were arguments.

Now, this should produce a visual that is (a) unique, and (b) can be parsed back into an equivalent Node.

benwr commented 1 year ago

How would you feel about adding a dev dependency on quickcheck? I might want to randomly generate operator trees and check that they round-trip to the same trees.

ISibboI commented 1 year ago

I am totally fine with new dev dependencies.

ISibboI commented 1 year ago

It seems like propagating the precision does not work. We can either just not support floating point precision, or we fix that somehow.