docs: kdoc: separate out the handling of the declaration phase
authorJonathan Corbet <corbet@lwn.net>
Sat, 21 Jun 2025 20:35:06 +0000 (14:35 -0600)
committerJonathan Corbet <corbet@lwn.net>
Wed, 25 Jun 2025 17:30:26 +0000 (11:30 -0600)
commite4153a2255b1a0f3398360895e79e7709a0600b2
treea095c7dd93c2bf4d0e26b05d156498250b9c55cf
parentdf2755269456d9ed02ad689aa8eaa50f7ac4217e
docs: kdoc: separate out the handling of the declaration phase

The BODY_MAYBE state really describes the "we are in a declaration" state.
Rename it accordingly, and split the handling of this state out from that
of the other BODY* states.  This change introduces a fair amount of
duplicated code that will be coalesced in a later patch.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250621203512.223189-4-corbet@lwn.net
scripts/lib/kdoc/kdoc_parser.py