Ejemplo n.º 1
0
        public override bool EnsureBuilt(
            bool force,
            PcodeSystem.IEvaluationContext pcodeEnvironment,
            BuildFailedCallback failedCallback)
        {
            if (!force && (_effectSpec != null))
            {
                return(true);
            }
            _effectSpec = null;

            int    ErrorLine;
            string ErrorExtraMessage;

            Synthesizer.EffectSpecListRec LocalEffectSpec;
            Synthesizer.BuildInstrErrors  Error = Synthesizer.BuildSectionEffectList(
                Source,
                ((Document)Parent).CodeCenter,
                out ErrorLine,
                out ErrorExtraMessage,
                out LocalEffectSpec);
            if (Error != Synthesizer.BuildInstrErrors.eBuildInstrNoError)
            {
                failedCallback(this, new LiteralBuildErrorInfo(Synthesizer.BuildInstrGetErrorMessageText(Error, ErrorExtraMessage), ErrorLine));
                return(false);
            }

            _effectSpec = LocalEffectSpec;
            return(true);
        }