]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
docs: kdoc: create a CMatch to match nested C blocks
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 17 Mar 2026 18:09:30 +0000 (19:09 +0100)
committerJonathan Corbet <corbet@lwn.net>
Sun, 22 Mar 2026 21:02:29 +0000 (15:02 -0600)
commitf1cf9f7cd66f1f90c4c3beb0885b6f7771e1b419
treed0e0d1c1772b5bd514ced2093cb4aa8369334507
parentbd167a2122600ac787913275ad1eb5dd38698d9f
docs: kdoc: create a CMatch to match nested C blocks

The NextMatch code is complex, and will become even more complex
if we add there support for arguments.

Now that we have a tokenizer, we can use a better solution,
easier to be understood.

Yet, to improve performance, it is better to make it use a
previously tokenized code, changing its ABI.

So, reimplement NextMatch using the CTokener class. Once it
is done, we can drop NestedMatch.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <fa818ea164216b17520b588e3f12b81499b76dd7.1773770483.git.mchehab+huawei@kernel.org>
tools/lib/python/kdoc/c_lex.py