public override void Visit(ClassDeclNode node)
        {
            ClassType classType = new ClassType(node.className.name);
            ClassBeingVisited = Analysis.Environment.Classes.Add(node.className.name);
            ClassBeingVisited.ClassType = classType;

            if(node.extendsClass != null)
                node.extendsClass.Accept(this);
        }
 public IdentifierTypeNode(string identifierName, int lineNumber)
 {
     Type = new ClassType(identifierName);
     this.name = identifierName;
     this.lineNumber = lineNumber;
 }
 private bool IsClassCompatible(ClassType actualType, ClassType expectedType)
 {
     if (actualType.Name == expectedType.Name)
         return true;
     if (actualType.BaseClassType == null)
         return false;
     else
         return IsClassCompatible(actualType.BaseClassType, expectedType);
 }