コード例 #1
0
        protected override bool Visit(ASTCompilerCall node)
        {
            if (!Visit(node.Arguments))
            {
                return(false);
            }

            var success = CheckMany(
                node.Position,
                node.Arguments,
                node.Procedure.Type.Arguments,
                (actual, expected) => CanImplecitCast(actual.TypeInfo, expected.Type),
                (actual, expected) => $"Procedure requires {expected} arguments, but was giving {actual}",
                (actual, expected) => $"Passing wrong type to procedure, expected {expected.Type}, but got {actual.TypeInfo}.");

            if (!success)
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
 protected override bool Visit(ASTCompilerCall node)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 protected abstract bool Visit(ASTCompilerCall node);