Exemplo n.º 1
0
        public Structures.AST.Program Parse()
        {
            var syntaxTree = new Structures.AST.Program();

            _scanner.ReadNextToken();
            var function = ParseFunction();

            while (function != null)
            {
                syntaxTree.Functions.Add(function);
                function = ParseFunction();
            }

            return(syntaxTree);
        }
Exemplo n.º 2
0
 public SemanticsChecker(Structures.AST.Program program)
 {
     _functions = new Dictionary <string, Block>();
     _program   = program;
 }