public static Expression CreateGenerated(Context cx, IExpressionParentEntity parent, int childIndex, Microsoft.CodeAnalysis.ITypeSymbol type, Extraction.Entities.Location location) { var info = new ExpressionInfo( cx, AnnotatedTypeSymbol.CreateNotAnnotated(type), location, ExprKind.TYPEOF, parent, childIndex, true, null); var ret = new Expression(info); TypeAccess.CreateGenerated(cx, ret, TypeOf.TypeAccessIndex, type, location); return(ret); }
public static Expression CreateGenerated(Context cx, IExpressionParentEntity parent, int childIndex, Microsoft.CodeAnalysis.ITypeSymbol type, object?value, Action <Expression, int> createChild, Extraction.Entities.Location location) { var info = new ExpressionInfo( cx, AnnotatedTypeSymbol.CreateNotAnnotated(type), location, ExprKind.CAST, parent, childIndex, true, ValueAsString(value)); var ret = new Expression(info); createChild(ret, ExpressionIndex); TypeAccess.CreateGenerated(cx, ret, TypeAccessIndex, type, location); return(ret); }