vast icon indicating copy to clipboard operation
vast copied to clipboard

Add more order of operation comparisons

Open nathanielnrn opened this issue 2 years ago • 4 comments

As discussed with @rachitnigam Previously all BinOps were grouped under a single precedence enum "Op." Now, they are spread out and more fine grained. This should fix issues regarding parentheses and order of operations.

Also, some formatting was affected

Fixes #12

nathanielnrn avatar Jul 11 '22 20:07 nathanielnrn

@nathanielnrn Seems like you might've committed a bunch of formatting changes. Can you separate them into a different PR or remove them entirely? Once done, I can re-review.

Sorry about that. @rachitnigam I reverted the formatting changes to all files without content-changes to them. But all of the the formatting changes in subset/pretty_print.rs were made through the rust-analyzers auto formatting with rustfmt. Is there a configuration I can use to properly match the formatting as is? I could revert rustfmt's changes manually if needed.

nathanielnrn avatar Jul 12 '22 03:07 nathanielnrn

yeah, seems like this project doesn't have a .rustfmt file which describes the default formatting rules which is why rustfmt did this. I'm okay with committing some of them.

rachitnigam avatar Jul 12 '22 04:07 rachitnigam

Made things nested, checks still fail due to other files' formatting from what I can tell, but should be good I think.

nathanielnrn avatar Jul 12 '22 15:07 nathanielnrn

That's really weird. The commands run for the workflow are here: https://github.com/vegaluisjose/vast/blob/main/Makefile

Can you try running the rules in the Makefile and see if you can locally reproduce the errors? It might be the case that VSCode might be using a globally configured .rustfmt causing it to format things differently

rachitnigam avatar Jul 12 '22 15:07 rachitnigam