neovim/neovim — pull request #710 by ZyX-I (2014-05-10 11:36:33+00:00)
Title: [WIP] Automatically generate declarations

Following #481 this PR aims to remove all declarations, generating additional `.h` files as one of the build steps.

Both static and non-static declarations are going to be removed. This means that distributed headers should be generated as an additional build step.

Progress:

- [x] Move documentation from declarations to definitions.
- [ ] Remove existing declarations.
- [ ] Add `#include` directives that include generated headers: one per each `*.c` and `*.h` file.
- [ ] Create a script that generates header files from C files.
- [ ] Tell cmake use new scripts.

About fourth step: it is best to use a fully featured C parser for this. But this means that adding additional dependency: I have clang in mind. But clang does not have lua bindings: a few luaclang\* projects I have found are dead. It also may be not available on all target platforms (may: I do not know what target platforms are). I will use Python with clang bindings for 2 and 3 (these scripts may only be useful until this PR is merged and all other PR’s are updated), but it is probably bad idea to use Python + libclang as an absolute requirement for building neovim, so I am wondering whether anybody here knows lua C parser library.