public override Object Visit(ClassDefinition node, Object obj) { this.thisType = (UserType)node.TypeExpr; for (int i = 0; i < node.BaseClass.Count; i++) { UserType baseClassOrInterface = (UserType)this.searchType(node.BaseClass[i], node.Location.Line, node.Location.Column); ClassType klass = baseClassOrInterface as ClassType, nodeType = (ClassType)node.TypeExpr; if (klass != null) { nodeType.AddBaseClass(klass, new Location(this.currentFile, node.Location.Line, node.Location.Column)); this.baseType = klass; } else { InterfaceType interfaze = baseClassOrInterface as InterfaceType; if (interfaze != null) { nodeType.AddBaseInterface((InterfaceType)baseClassOrInterface, new Location(this.currentFile, node.Location.Line, node.Location.Column)); } else { ErrorManager.Instance.NotifyError(new UnknownTypeError(node.BaseClass[i], node.Location)); } } } // * If node base class is defined, System.Object is added ClassType typeOfNode = node.TypeExpr as ClassType; if (typeOfNode != null && typeOfNode.BaseClass == null) { this.baseType = (ClassType)TypeTable.Instance.GetType("System.Object", node.Location); typeOfNode.AddBaseClass((ClassType)this.baseType, node.Location); } ((ClassType)node.TypeExpr).Members = builtClass(node, obj); node.TypeExpr.BuildTypeExpressionString(TypeExpression.MAX_DEPTH_LEVEL_TYPE_EXPRESSION); this.thisType = null; this.baseType = null; return(null); }