Exemplo n.º 1
0
        /// <summary>Native method for Grace match</summary>
        /// <param name="ctx">Current interpreter</param>
        /// <param name="target">Target of the match</param>
        private GraceObject mMatch(EvaluationContext ctx, GraceObject target)
        {
            var gop = target as GraceObjectProxy;

            if (gop == null)
            {
                return(Matching.FailedMatch(ctx, target));
            }
            if (gop.Object is T)
            {
                return(Matching.SuccessfulMatch(ctx, target));
            }
            return(Matching.FailedMatch(ctx, target));
        }