private string FormatExpression(IFilterTree tree, bool isolate) { if (TokenMappings.IsLogicalOperation(tree.Token)) { return(FormatLogicalExpression(tree, isolate)); } if (TokenMappings.IsComparisonOperation(tree.Token)) { return(FormatComparisonExpression(tree)); } if (TokenMappings.IsBoolean(tree.Token)) { return(FormatBooleanValue(tree)); } throw new FormaterException($"Encountered unexpected node of type {tree.Token.Type}."); }