Exemplo n.º 1
0
        public override void Visit(CallStatement statement)
        {
            var tcv = new TypeCheckVisitor();

            if (statement.ArgumentExpressions.Count != statement.Target.Parameters.Count)
                throw new Exception("Parameter count mismatch");

            for (var i = 0; i < statement.ArgumentExpressions.Count; i++)
            {
                statement.ArgumentExpressions[i].AcceptVisitor(tcv);
                if (tcv.ResultType != statement.Target.Parameters[i].Type.ToReflectionType())
                    throw new Exception("Parameter type mismatch");
            }
        }
Exemplo n.º 2
0
 public override void Visit(CallStatement statement)
 {
     ResultType = statement.Target.ReturnType.ToReflectionType();
 }
Exemplo n.º 3
0
 public abstract void Visit(CallStatement statement);