|
python-doxygen
Reference documentation for python-doxygen
|
Translates supported Python docstring fields for Doxygen. More...
Go to the source code of this file.
Functions | |
| static void | awk_doxygen_begin_initialize_filter () |
Initializes parser state and consumes the --strict option. | |
| AwkValue | leading_width (AwkValue line) |
| Returns the leading indentation width of a source line. | |
| AwkValue | warn (AwkValue message) |
| Records and emits one translation diagnostic. | |
| AwkValue | is_blank_or_comment (AwkValue line) |
| Tests for input that may precede a suite's first statement. | |
| AwkValue | is_declaration_start (AwkValue line) |
| Recognizes governed class and function declaration starts. | |
| AwkValue | declaration_header_complete (AwkValue line) |
| Tests whether a declaration header reaches its suite-opening colon. | |
| AwkValue | starts_docstring (AwkValue line) |
| Tests for a supported triple-double-quoted docstring start. | |
| AwkValue | docstring_open_width (AwkValue line) |
| Returns the byte width of a supported docstring opening form. | |
| AwkValue | closes_same_line (AwkValue line) |
| Tests whether a recognized docstring closes on its opening line. | |
| AwkValue | translate_doc_line (AwkValue line) |
| Translates one supported structured field inside a docstring. | |
| static void | awk_doxygen_rule_translate_source_record () |
| Passes source through and translates fields in recognized docstrings. | |
| static void | awk_doxygen_end_finalize_filter () |
| Diagnoses unfinished state and enforces strict-mode failure. | |
Translates supported Python docstring fields for Doxygen.
Preserves Python source and rewrites only governed structured fields inside conservatively recognized docstrings. This is an intentionally small documentation translator, not a complete Python parser. See ADR-001, ADR-002, ADR-003, ADR-009, and ADR-010 before widening recognition or representation behavior.
Definition in file doxygen-python.awk.
| AwkValue closes_same_line | ( | AwkValue | line | ) |
Tests whether a recognized docstring closes on its opening line.
Identifies the governed opening width and searches the remainder of the line for a second triple-double-quote delimiter.
| line | Recognized docstring start line. |
| AwkValue declaration_header_complete | ( | AwkValue | line | ) |
Tests whether a declaration header reaches its suite-opening colon.
Removes trailing horizontal whitespace and checks for a final colon. This is intentionally narrower than Python lexical parsing and does not interpret inline comments, strings, annotations, or balanced delimiters.
| line | Physical declaration-header line to inspect. |
| AwkValue docstring_open_width | ( | AwkValue | line | ) |
Returns the byte width of a supported docstring opening form.
Distinguishes ordinary and raw supported openings after removing leading horizontal whitespace. Unsupported forms return zero.
| line | Source line beginning with a possible docstring opening. |
| AwkValue is_blank_or_comment | ( | AwkValue | line | ) |
Tests for input that may precede a suite's first statement.
Removes leading horizontal whitespace from a scratch copy and then checks whether the remaining input is empty or begins with a comment marker.
| line | Source line to inspect. |
| AwkValue is_declaration_start | ( | AwkValue | line | ) |
Recognizes governed class and function declaration starts.
Removes leading horizontal whitespace from a scratch copy and recognizes only the conservative declaration-start forms governed by ADR-009.
| line | Source line to inspect. |
| AwkValue leading_width | ( | AwkValue | line | ) |
Returns the leading indentation width of a source line.
Copies the input into scratch storage before removing everything after the leading spaces and tabs. The caller-supplied value is not modified.
| line | Source line to inspect. |
| AwkValue starts_docstring | ( | AwkValue | line | ) |
Tests for a supported triple-double-quoted docstring start.
Removes leading horizontal whitespace and recognizes the ordinary delimiter plus the r and R raw prefixes required by ADR-009.
| line | Source line to inspect. |
| AwkValue translate_doc_line | ( | AwkValue | line | ) |
Translates one supported structured field inside a docstring.
Preserves indentation, recognizes only governed Sphinx field forms, and returns the original line whenever no safe translation exists. Malformed governed fields are diagnosed and left unchanged. ADR-003 and ADR-010 permit titled-paragraph translations to contain one embedded newline so Doxygen receives a separate paragraph title and body.
| line | Physical docstring line to inspect. field. |
warn().| AwkValue warn | ( | AwkValue | message | ) |
Records and emits one translation diagnostic.
Increments the global diagnostic count and writes one location-qualified warning for the current input record.
| message | Stable diagnostic text. |
diagnostics counter.