Lines Matching defs:line

237     SPECIAL_SECTION = 4      #: Doc section ending with a blank line.
354 # Treat as a new paragraph - add a blank line
826 # Format inline enums with each member on its own line.
833 # for each line.
1110 # that fails, just grab the rest of the line to the last closing
1212 def process_export(function_set, line):
1224 # Note: it accepts only one EXPORT_SYMBOL* per line, as having
1227 if export_symbol.search(line):
1229 elif export_symbol_ns.search(line):
1243 def process_normal(self, ln, line):
1248 if not doc_start.match(line):
1254 # next line is always the function name
1257 def process_name(self, ln, line):
1259 STATE_NAME: Looking for the "name - description" line
1264 if doc_block.search(line):
1274 # Otherwise we're looking for a normal kerneldoc declaration line.
1276 elif doc_decl.search(line):
1280 if doc_begin_data.search(line):
1286 elif doc_begin_func.search(line):
1294 f"This comment starts with '/**', but isn't a kernel-doc comment. Refer to Documentation/doc-guide/kernel-doc.rst\n{line}")
1310 if r.search(line):
1318 f"missing initial short description on line:\n{line}")
1322 f"wrong kernel-doc identifier on line:\n{line}")
1333 self.emit_msg(ln, f"Cannot find identifier on line:\n{line}")
1335 def is_new_section(self, ln, line):
1339 if doc_sect.search(line):
1370 def is_comment_end(self, ln, line):
1374 if doc_end.search(line):
1379 if r.match(line):
1380 self.emit_msg(ln, f"suspicious ending line: {line}")
1390 def process_decl(self, ln, line):
1394 if self.is_new_section(ln, line) or self.is_comment_end(ln, line):
1397 # Look for anything with the " * " line beginning.
1399 if doc_content.search(line):
1402 # A blank line means that we have moved out of the declaration
1415 # Unknown line, ignore
1416 self.emit_msg(ln, f"bad line: {line}")
1419 def process_special(self, ln, line):
1421 STATE_SPECIAL_SECTION: a section ending with a blank line.
1424 # If we have hit a blank line (only the " * " marker), then this
1427 if KernRe(r"\s*\*\s*$").match(line):
1432 # Not a blank line, look for the other ways to end the section.
1434 if self.is_new_section(ln, line) or self.is_comment_end(ln, line):
1439 if doc_content.search(line):
1444 # confused. For the second line (the None case), see what we
1467 # Unknown line, ignore
1468 self.emit_msg(ln, f"bad line: {line}")
1470 def process_body(self, ln, line):
1474 if self.is_new_section(ln, line) or self.is_comment_end(ln, line):
1477 if doc_content.search(line):
1481 # Unknown line, ignore
1482 self.emit_msg(ln, f"bad line: {line}")
1484 def process_inline_name(self, ln, line):
1487 if doc_inline_sect.search(line):
1491 elif doc_inline_end.search(line):
1494 elif doc_content.search(line):
1495 self.emit_msg(ln, f"Incorrect use of kernel-doc format: {line}")
1499 def process_inline_text(self, ln, line):
1502 if doc_inline_end.search(line):
1505 elif doc_content.search(line):
1585 def process_proto_function(self, ln, line):
1588 # strip C99-style comments to end of line
1589 line = KernRe(r"//.*$", re.S).sub('', line)
1591 # Soak up the line's worth of prototype text, stopping at { or ; if present.
1593 if KernRe(r'\s*#\s*define').match(line):
1594 self.entry.prototype = line
1595 elif not line.startswith('#'): # skip other preprocessor stuff
1597 if r.match(line):
1602 if '{' in line or ';' in line or KernRe(r'\s*#\s*define').match(line):
1630 def process_proto_type(self, ln, line):
1636 line = KernRe(r"//.*$", re.S).sub('', line).strip()
1637 if not line:
1641 if line.startswith('#'):
1642 line += ";"
1648 for chunk in r.split(line):
1664 # We hit the end of the line while still in the declaration; put
1669 def process_proto(self, ln, line):
1672 if doc_inline_oneline.search(line):
1677 elif doc_inline_start.search(line):
1681 self.process_proto_function(ln, line)
1684 self.process_proto_type(ln, line)
1686 def process_docblock(self, ln, line):
1689 if doc_end.search(line):
1694 elif doc_content.search(line):
1708 for line in fp:
1709 self.process_export(export_table, line)
1731 Open and process each line of a C source file.
1732 The parsing is controlled via a state machine, and the line is passed
1746 for ln, line in enumerate(fp):
1748 line = line.expandtabs().strip("\n")
1752 if line.endswith("\\"):
1753 prev += line.rstrip("\\")
1760 line = prev + line
1766 line)
1774 not self.process_export(export_table, line):
1775 # Hand this line to the appropriate state handler
1776 self.state_actions[self.state](self, ln, line)