예제 #1
0
        public int VisitProcActualParameter(ProcActualParameter ast, Frame frame)
        {
            var routine = ast.Identifier.Declaration.Entity as IRoutineEntity;

            routine.EncodeFetch(_emitter, frame);
            return(Machine.ClosureSize);
        }
예제 #2
0
        public Void VisitProcActualParameter(ProcActualParameter ast, FormalParameter arg)
        {
            var binding   = ast.Identifier.Visit(this);
            var procedure = binding as IProcedureDeclaration;

            if (procedure != null)
            {
                var formals = procedure.Formals;
                if (arg is ProcFormalParameter)
                {
                    var param = (ProcFormalParameter)arg;
                    CheckAndReportError(formals.Equals(param.Formals),
                                        "wrong signature for procedure \"%\"", ast.Identifier);
                }
                else
                {
                    ReportError("proc actual parameter not expected here", ast);
                }
            }
            else
            {
                ReportUndeclaredOrError(binding, ast.Identifier, "\"%\" is not a procedure identifier");
            }
            return(null);
        }