Skip to content

Commit

Permalink
big ident to indent renaming for #427
Browse files Browse the repository at this point in the history
  • Loading branch information
dadhi committed Oct 27, 2024
1 parent eb1fd78 commit a60cf3f
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 302 deletions.
6 changes: 3 additions & 3 deletions src/FastExpressionCompiler.LightExpression/Expression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public virtual bool TryEmit(CompilerFlags flags, ref ClosureInfo closure, IParam

public virtual bool IsCustomToCSharpString => false;
public virtual StringBuilder CustomToCSharpString(StringBuilder sb, ToCSharpPrinter.EnclosedIn enclosedIn,
int lineIdent = 0, bool stripNamespace = false, Func<Type, string, string> printType = null, int identSpaces = 4,
int lineIdent = 0, bool stripNamespace = false, Func<Type, string, string> printType = null, int indentSpaces = 4,
CodePrinter.ObjectToCode notRecognizedToCode = null) => sb;

#if SUPPORTS_VISITOR
Expand Down Expand Up @@ -3002,14 +3002,14 @@ public override bool TryEmit(CompilerFlags flags, ref ClosureInfo closure, IPara

public override bool IsCustomToCSharpString => true;
public override StringBuilder CustomToCSharpString(StringBuilder sb, ToCSharpPrinter.EnclosedIn enclosedIn,
int lineIdent = 0, bool stripNamespace = false, Func<Type, string, string> printType = null, int identSpaces = 4,
int lineIdent = 0, bool stripNamespace = false, Func<Type, string, string> printType = null, int indentSpaces = 4,
CodePrinter.ObjectToCode notRecognizedToCode = null)
{
var encloseInParens = enclosedIn != ToCSharpPrinter.EnclosedIn.LambdaBody && enclosedIn != ToCSharpPrinter.EnclosedIn.Return;
sb = encloseInParens ? sb.Append("((") : sb.Append('(');

sb.Append(Type.ToCode(stripNamespace, printType)).Append(')');
sb = Operand.ToCSharpString(sb, lineIdent, stripNamespace, printType, identSpaces, notRecognizedToCode);
sb = Operand.ToCSharpString(sb, lineIdent, stripNamespace, printType, indentSpaces, notRecognizedToCode);

sb.Append(".Invoke"); // Hey, this is the CUSTOM part of the output.

Expand Down
Loading

0 comments on commit a60cf3f

Please sign in to comment.