Microsoft.R.Core.AST.AstRootExtensions.IsCompleteExpression C# (CSharp) Method

IsCompleteExpression() public static method

public static IsCompleteExpression ( this expressionAst ) : bool
expressionAst this
return bool
        public static bool IsCompleteExpression(this AstRoot expressionAst) {
            foreach (var error in expressionAst.Errors) {
                if (error.ErrorType == ParseErrorType.CloseCurlyBraceExpected ||
                    error.ErrorType == ParseErrorType.CloseBraceExpected ||
                    error.ErrorType == ParseErrorType.CloseSquareBracketExpected ||
                    error.ErrorType == ParseErrorType.FunctionBodyExpected ||
                    error.ErrorType == ParseErrorType.RightOperandExpected) {
                    return false;
                }
            }
            return true;
        }
    }