Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce redundancy of grouping symbols #11

Merged
merged 10 commits into from
Dec 22, 2023
Merged

Conversation

nfejzic
Copy link
Owner

@nfejzic nfejzic commented Dec 21, 2023

In some cases groupings are used to indicate that a certain part of expression should be interpreted as a single term. For example in fractions: (a + b) / (c + d), or when using scripts x^(n-1) and so on.

In such cases, the grouping symbols don't have to be rendered. For example $\frac{a + b}{c + d} \equiv \frac{(a + b)}{(c + d)}$. The same holds for the scripts: $x^{n-1} \equiv x^{(n-1)}$.

This PR solves that problem. Also, some structures are simplified by using SimpleExpr::Interm instead of SimpleExpr::Grouping with ignored grouping symbols. This makes snapshots somewhat simpler.

Additionally, block rendering in binary is now supported with -b, --block flag.

@nfejzic nfejzic merged commit 176696b into main Dec 22, 2023
2 checks passed
@nfejzic nfejzic deleted the fix-grouping-redundancy branch December 22, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant