Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> writes: > Em Tue, 06 Feb 2024 13:20:34 +0200 > Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> escreveu: >> - Use Python bindings for libclang to parse the source code. Clang is >> obviously a big dependency, but nowadays more people have it already >> installed, and the Python part on top is neglible. > > Ok, but this may increase the doc generation time, and would make clang > mandatory for doc generation. As you mentioned, most developers have > clang installed already, so it shouldn't be a big issue. I have pondered such things (tree-sitter too) in the past. The problem is that these parsers parse C, which isn't what kernel-doc is looking for. It needs to see the code without preprocessor intervention, and it needs to see the comments. There might also be more resistance to requiring clang that one might expect. >> - Don't parse the contents of the comments, at all. Treat it as pure >> rst, and let Sphinx handle it. That would fix the latter problem, at the cost of breaking tens of thousands of kerneldoc comments in the code. I don't relish the idea of all the churn needed to fix that up... That might have been a good decision to make 20 years or so ago; it's hard to see it as an option now. jon