Exemplo n.º 1
0
        public List <Exception> CheckSyntaxTree(Node tree)
        {
            List <Exception> exceptionList = new List <Exception>();

            //Check modules
            ModuleChecker moduleChecker = new ModuleChecker(exceptionList);

            moduleChecker.CheckModule(tree);

            //Check declarations
            DeclarationChecker declarationChecker = new DeclarationChecker(exceptionList);

            declarationChecker.VisitModule(tree);

            return(exceptionList);
        }
Exemplo n.º 2
0
        public List <Exception> CheckSyntaxTree(SyntaxTree tree)
        {
            List <Exception> exceptions = new List <Exception>();

            //Check module
            ModuleChecker moduleChecker = new ModuleChecker(exceptions);

            moduleChecker.Visit(tree.GetRoot());

            //Check function/variable declarations
            DeclarationChecker declarationChecker = new DeclarationChecker(exceptions);

            declarationChecker.Visit(tree.GetRoot());

            return(exceptions);
        }