def add_return_type(self, node, ctype): # emphasize the 'return type' # used for macros, defines, structs, enums, typedefs and # so on where 'return type' is actually the type name for part in filter(None, wsplit_re.split(ctype)): tnode = nodes.emphasis(part, part) node += tnode
def add_return_type(self, node, ctype): # emphasize the 'return type' # used for macros, defines, structs, enums, typedefs and # so on where 'return type' is actually the type name parts = wsplit_re.split(ctype) node += nodes.emphasis(parts[0], parts[0]) parts = parts[1:len(parts)] for part in parts: tnode = nodes.Text(part, part) node += tnode
def add_cross_ref(self, node, ctype): # add cross-ref nodes for all words for part in filter(None, wsplit_re.split(ctype)): tnode = nodes.Text(part, part) if part[0] in string.ascii_letters+'_' and \ part not in self.stopwords: pnode = addnodes.pending_xref( '', refdomain='c', reftype='type', reftarget=part, modname=None, classname=None) pnode += tnode node += pnode else: node += tnode
def add_cross_ref(self, node, ctype): # add cross-ref nodes for all words for part in filter(None, wsplit_re.split(ctype)): tnode = nodes.Text(part, part) if part[0] in string.ascii_letters+'_' and \ part not in self.stopwords: pnode = addnodes.pending_xref('', refdomain='c', reftype='type', reftarget=part, modname=None, classname=None) pnode += tnode node += pnode else: node += tnode