Skip to content

regen/HeaderParser: Clarify/correct pod #23493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions regen/HeaderParser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1673,8 +1673,8 @@ rearrange its terms so that each line is not longer than this.

=item indent_define

Should #define clauses be indented when contained a clause expression that is
indented.
Should #define clauses be indented when contained in a clause expression that
is indented, default is yes: 1.

=item hug_define

Expand Down Expand Up @@ -1703,7 +1703,7 @@ based object which contains the following fields:
bless {
cond => [['defined(a)'],['defined(b)']],
type => "content",
sub_type => undef,
sub_type => "#undef",
raw => $raw_content_of_line,
line => $normalized_content_of_line,
level => $level,
Expand Down Expand Up @@ -1759,21 +1759,21 @@ it terminates.

=item type

This value indicates the type of the line. This may be one of the following:
'content', 'cond', 'define', 'include' and 'error'. Several of the types
have a sub_type.
This value indicates the type of the line. This may either 'content' or
'cond'. The sub_type gives finer detail.

=item sub_type

This value gives more detail on the type of the line where necessary.
Not all types have a subtype.
This value gives more detail on the type of the line.

Type | Sub Type
--------+----------
content | text
| include
| define
| error
| #include
| #define
| #error
| #pragma
| #undef
cond | #if
| #elif
| #else
Expand All @@ -1783,6 +1783,9 @@ Note that there are no '#ifdef' or '#elifndef' or similar expressions. All
expressions of that form are normalized into the '#if defined' form to
simplify processing.

For all sub_types except C<#endif>, the C<cond> array gives the conditions
after the line is executed.

=item raw

This was the raw original text before HeaderParser performed any modifications
Expand Down Expand Up @@ -1819,7 +1822,8 @@ or input it cannot handle.

=head2 lines_as_str

This function will return a string representation of the lines it is provided.
This function will return a string representation of the lines it is provided
via an array of HeaderLines objects produced by parse_fh() or by group_content()

=head2 group_content

Expand Down
Loading