Exemplo n.º 1
0
 public override void ResolveNames(LexicalScope scope)
 {
     if (scope != null)
     {
         decl = scope.ResolveName(assName);
     }
     if (decl == null)
     {
         Console.WriteLine("Undeclared Identifier");
         throw new Exception("Resolve Name Error");
     }
 }
Exemplo n.º 2
0
        public Declare ResolveName(string symbol)
        {
            Declare decl = ResoveNameHere(symbol);

            if (decl != null)
            {
                return(decl);
            }
            else if (parent != null)
            {
                return(parent.ResolveName(symbol));
            }
            else
            {
                return(null);
            }
        }