Lines Matching +full:sub +full:- +full:block
2 # SPDX-License-Identifier: GPL-2.0
8 Implement output filters to print kernel-doc documentation.
30 type_constant2 = KernRe(r"\%([-_*\w]+)", cache=False)
32 type_param_ref = KernRe(r"([\!~\*]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)", cache=False)
38 type_fp_param2 = KernRe(r"\@(\w+->\S+)\(\)", cache=False)
45 type_member = KernRe(r"\&([_\w]+)(\.|->)([_\w]+)", cache=False)
52 Base class for OutputFormat. If used as-is, it means that only
60 OUTPUT_INTERNAL = 3 # output non-exported symbols
112 def highlight_block(self, block):
114 Apply the RST highlights to a sub-block of text.
117 for r, sub in self.highlights:
118 block = r.sub(sub, block)
120 return block
180 Handles a single entry from kernel-doc parser
211 self.config.log.warning("doesn't now how to output '%s' block",
219 """Outputs a DOC block"""
259 sphinx_cblock = KernRe(r'^\.\.\ +code-block::', cache=False)
289 block = ""
293 # If we're in a literal block, see if we should drop out of it.
297 # If this is the first non-blank line in a literal block,
314 # Not in a literal block (or just dropped out)
316 block += line + "\n"
320 output += self.highlight_block(block)
321 block = ""
323 # Handle any remaining block
324 if block:
325 output += self.highlight_block(block)
333 Outputs a block section.
420 parameter_name = KernRe(r'\[.*').sub('', parameter)
564 "%Y-%m-%d",
596 def output_highlight(self, block):
602 contents = self.highlight_block(block)
608 line = KernRe(r"^\s*").sub("", line)
633 self.data += f"{name} \\- {args['purpose']}\n"
646 if count == len(args.parameterlist) - 1:
651 # Pointer-to-function
654 dtype = KernRe(r'([^\*])$').sub(r'\1 ', dtype)
664 parameter_name = re.sub(r'\[.*', '', parameter)
677 self.data += f"enum {name} \\- {args['purpose']}\n"
685 if count == len(args.parameterlist) - 1:
695 parameter_name = KernRe(r'\[.*').sub('', parameter)
710 self.data += f"typedef {name} \\- {purpose}\n"
724 self.data += f"{args.type} {name} \\- {purpose}\n"
728 declaration = KernRe(r"\n").sub('"\n.br\n.BI "', declaration)
739 parameter_name = re.sub(r"\[.*", "", parameter)