public override void Visit(CompositeTerm composite) { // remove blank raws for (int i = 0; i < composite.Terms.Count; i++) { if (composite.Terms[i] is RawTerm { Content: "" })
public override void Visit(CompositeTerm composite) { var prefix = new CompositeTerm(new List <Term>()); CompositeTerm suffix = null; for (int i = 0; i < composite.Terms.Count; i++) { if (composite.Terms[i] is DividerTerm) { prefix = new CompositeTerm(new List <Term>()); suffix = null; } else if (composite.Terms[i] is LeftRightTerm newLeftRightTerm) { composite.Terms.RemoveRange(i - prefix.Terms.Count, prefix.Terms.Count); i -= prefix.Terms.Count; if (newLeftRightTerm.Left is not RawTerm { Content: "" })
public virtual void Visit(CompositeTerm composite) { composite.Terms.ForEach(t => t.Accept(this)); }