Ejemplo n.º 1
0
        public AllType?IsDeclaredInMain(string VariableName)
        {
            SymbolTable.OpenScope("Main");
            var test = SymbolTable.RetrieveSymbol(VariableName);

            SymbolTable.CloseScope();
            return(test);
        }
Ejemplo n.º 2
0
 private void checkCollectionFollowsCollection(string varName)
 {
     if (varName.Contains('.'))
     {
         string[] names      = varName.Split('.');
         string   lastString = "";
         for (int i = 0; i < names.Length - 1; i++)
         {
             string currentCheck = lastString + names[i];
             lastString = currentCheck + ".";
             _symbolTable.RetrieveSymbol(currentCheck, out bool isCollection, false);
             {
                 if (isCollection)
                 {
                     _symbolTable.IllegalCollectionPath(varName);
                 }
             }
         }
     }
 }