コード例 #1
0
        public void PerformChecks(Lifetime checksLifetime, TutorialStepPresenter stepPresenter)
        {
            switch (GoToNextStep)
            {
            case GoToNextStep.Auto:
                var checker = new MainChecker(checksLifetime, this, stepPresenter.Solution,
                                              stepPresenter.PsiFiles, stepPresenter.TextControlManager, stepPresenter.ShellLocks,
                                              stepPresenter.EditorManager,
                                              stepPresenter.DocumentManager);
                checker.PerformStepChecks();
                break;

            case GoToNextStep.Manual:
                var nextStepPressChecker =
                    new NextStepShortcutChecker(checksLifetime, this, GlobalSettings.NextStepShortcutAction);
                break;
            }
        }
コード例 #2
0
        public int Check(ASTNode root)
        {
            var intrinsics = new Scope <TypeSymbol>();

            foreach (var fun in Intrinsics.LIntrinsics)
            {
                intrinsics.PutInScope(fun.Key, fun.Value.FunctionSymbol);
            }

            TypeChecker tc = new TypeChecker(this, intrinsics);

            tc.Visit(root);

            MainChecker mc = new MainChecker();

            mc.Visit(root);
            CheckAndReport(mc.FoundMain, new SourceLoc(), "No Main-Function found");

            AllPathsReturnChecker aprc = new AllPathsReturnChecker(this);

            aprc.Visit(root);

            return(errors);
        }