Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public static bool IsSimpleValueExpression([CanBeNull] this IFSharpExpression fsExpr) =>
 fsExpr.IgnoreInnerParens() is
 {
Example #4
0
 public static IWhileExpr GetByExpression([CanBeNull] IFSharpExpression param) =>
 GetByConditionExpr(param) ?? GetByDoExpression(param);
Example #5
0
 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);
Example #7
0
 public static IAppExpr GetByArgument([CanBeNull] IFSharpExpression param) =>
 (IAppExpr)BinaryAppExprNavigator.GetByArgument(param) ??
 PrefixAppExprNavigator.GetByArgumentExpression(param);
Example #8
0
 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);
Example #10
0
 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);
Example #12
0
 public static IConditionOwnerExpr GetByExpr([CanBeNull] IFSharpExpression param) =>
 (IConditionOwnerExpr)IfThenElseExprNavigator.GetByExpression(param) ??
 WhileExprNavigator.GetByExpression(param);