Lines Matching defs:line

234     SPECIAL_SECTION = 4      # doc section ending with a blank line
340 # Treat as a new paragraph - add a blank line
770 # Format inline enums with each member on its own line.
777 # for each line.
977 # that fails, just grab the rest of the line to the last closing
1079 def process_export(function_set, line):
1091 # Note: it accepts only one EXPORT_SYMBOL* per line, as having
1094 if export_symbol.search(line):
1096 elif export_symbol_ns.search(line):
1110 def process_normal(self, ln, line):
1115 if not doc_start.match(line):
1121 # next line is always the function name
1124 def process_name(self, ln, line):
1126 STATE_NAME: Looking for the "name - description" line
1131 if doc_block.search(line):
1141 # Otherwise we're looking for a normal kerneldoc declaration line.
1143 elif doc_decl.search(line):
1147 if doc_begin_data.search(line):
1153 elif doc_begin_func.search(line):
1161 f"This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst\n{line}")
1177 if r.search(line):
1185 f"missing initial short description on line:\n{line}")
1189 f"wrong kernel-doc identifier on line:\n{line}")
1200 self.emit_msg(ln, f"Cannot find identifier on line:\n{line}")
1205 def is_new_section(self, ln, line):
1206 if doc_sect.search(line):
1240 def is_comment_end(self, ln, line):
1241 if doc_end.search(line):
1246 if r.match(line):
1247 self.emit_msg(ln, f"suspicious ending line: {line}")
1257 def process_decl(self, ln, line):
1261 if self.is_new_section(ln, line) or self.is_comment_end(ln, line):
1264 # Look for anything with the " * " line beginning.
1266 if doc_content.search(line):
1269 # A blank line means that we have moved out of the declaration
1282 # Unknown line, ignore
1283 self.emit_msg(ln, f"bad line: {line}")
1286 def process_special(self, ln, line):
1288 STATE_SPECIAL_SECTION: a section ending with a blank line
1291 # If we have hit a blank line (only the " * " marker), then this
1294 if KernRe(r"\s*\*\s*$").match(line):
1299 # Not a blank line, look for the other ways to end the section.
1301 if self.is_new_section(ln, line) or self.is_comment_end(ln, line):
1306 if doc_content.search(line):
1311 # confused. For the second line (the None case), see what we
1334 # Unknown line, ignore
1335 self.emit_msg(ln, f"bad line: {line}")
1337 def process_body(self, ln, line):
1341 if self.is_new_section(ln, line) or self.is_comment_end(ln, line):
1344 if doc_content.search(line):
1348 # Unknown line, ignore
1349 self.emit_msg(ln, f"bad line: {line}")
1351 def process_inline_name(self, ln, line):
1354 if doc_inline_sect.search(line):
1358 elif doc_inline_end.search(line):
1361 elif doc_content.search(line):
1362 self.emit_msg(ln, f"Incorrect use of kernel-doc format: {line}")
1366 def process_inline_text(self, ln, line):
1369 if doc_inline_end.search(line):
1372 elif doc_content.search(line):
1452 def process_proto_function(self, ln, line):
1455 # strip C99-style comments to end of line
1456 line = KernRe(r"//.*$", re.S).sub('', line)
1458 # Soak up the line's worth of prototype text, stopping at { or ; if present.
1460 if KernRe(r'\s*#\s*define').match(line):
1461 self.entry.prototype = line
1462 elif not line.startswith('#'): # skip other preprocessor stuff
1464 if r.match(line):
1469 if '{' in line or ';' in line or KernRe(r'\s*#\s*define').match(line):
1497 def process_proto_type(self, ln, line):
1501 line = KernRe(r"//.*$", re.S).sub('', line).strip()
1502 if not line:
1506 if line.startswith('#'):
1507 line += ";"
1513 for chunk in r.split(line):
1529 # We hit the end of the line while still in the declaration; put
1534 def process_proto(self, ln, line):
1537 if doc_inline_oneline.search(line):
1542 elif doc_inline_start.search(line):
1546 self.process_proto_function(ln, line)
1549 self.process_proto_type(ln, line)
1551 def process_docblock(self, ln, line):
1554 if doc_end.search(line):
1559 elif doc_content.search(line):
1573 for line in fp:
1574 self.process_export(export_table, line)
1599 Open and process each line of a C source file.
1600 The parsing is controlled via a state machine, and the line is passed
1614 for ln, line in enumerate(fp):
1616 line = line.expandtabs().strip("\n")
1620 if line.endswith("\\"):
1621 prev += line.rstrip("\\")
1628 line = prev + line
1634 line)
1642 not self.process_export(export_table, line):
1643 # Hand this line to the appropriate state handler
1644 self.state_actions[self.state](self, ln, line)