def enterClass_def(self, ctx: ConfigParser.Class_defContext): name = ctx.id_str().getText() #print("enter class_def: " + name) classNd = Cm.CfgClassNode(name) # add class node to model self.addComment(classNd) # extract comment
def visit_ClassDef(self, node): #print(type(node).__name__, 'found:', node.name) classNd = Cm.CfgClassNode(node.name, node) # add class node to model classNd.comment = __class__.pyF1GetComment(node) # extract comment ast.NodeVisitor.generic_visit(self, node) Cm.BaseCfgNode.finishNode(False) # pop node from active stack