private static FSharpString GetStringConst([CanBeNull] IFSharpExpression expr) { switch (expr) { case IParenExpr parenExpr: return(GetStringConst(parenExpr.InnerExpression)); case IConstExpr constExpr: return(constExpr.FirstChild as FSharpString); } return(null); }
private static bool IsModuleSuffixExpr([CanBeNull] IFSharpExpression expr) { switch (expr) { case ParenExpr parenExpr: return(IsModuleSuffixExpr(parenExpr.InnerExpression)); case IReferenceExpr referenceExpr: return(referenceExpr.QualifiedName == ModuleSuffixFlag); } return(false); }
public static bool IsSimpleValueExpression([CanBeNull] this IFSharpExpression fsExpr) => fsExpr.IgnoreInnerParens() is {
public static IWhileExpr GetByExpression([CanBeNull] IFSharpExpression param) => GetByConditionExpr(param) ?? GetByDoExpression(param);
public static IBinaryAppExpr GetByArgument([CanBeNull] IFSharpExpression param) => GetByLeftArgument(param) ?? GetByRightArgument(param);
public static IFSharpArgumentsOwner GetByArgumentExpression([CanBeNull] IFSharpExpression param) => (IFSharpArgumentsOwner)AppLikeExprNavigator.GetByArgumentExpression(param) ?? AttributeNavigator.GetByExpression(param);
public static IAppExpr GetByArgument([CanBeNull] IFSharpExpression param) => (IAppExpr)BinaryAppExprNavigator.GetByArgument(param) ?? PrefixAppExprNavigator.GetByArgumentExpression(param);
public static IIndexerExpr GetByQualifierIgnoreIndexers([CanBeNull] IFSharpExpression param) => GetByQualifier(param) is var indexer && indexer != null
public static IIfThenElseExpr GetByExpression([CanBeNull] IFSharpExpression param) => GetByConditionExpr(param) ?? GetByBranchExpression(param);
public static IPrefixAppExpr GetByExpression([CanBeNull] IFSharpExpression param) => GetByFunctionExpression(param) ?? GetByArgumentExpression(param);
public static IForLikeExpr GetByInExpression([CanBeNull] IFSharpExpression param) => ForExprNavigator.GetByIdentExpression(param) ?? (IForLikeExpr)ForExprNavigator.GetByToExpression(param) ?? ForEachExprNavigator.GetByInExpression(param);
public static IConditionOwnerExpr GetByExpr([CanBeNull] IFSharpExpression param) => (IConditionOwnerExpr)IfThenElseExprNavigator.GetByExpression(param) ?? WhileExprNavigator.GetByExpression(param);