aboutsummaryrefslogtreecommitdiff
path: root/scripts/msgpack-gen.lua
Commit message (Collapse)AuthorAge
* Add automatic generation of headersZyX2014-06-02
| | | | | | | | | | | | | | | | | - The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception.
* Add --api-metadata command line optionRui Abreu Ferreira2014-06-02
| | | | | - New command line option prints the binary API metadata object and exits
* API: Events: Automatically pass channel ids to API functionsThiago de Arruda2014-05-28
| | | | | The dispatch function generator was customized to allow for API functions to declare a 'channel_id' as first argument.
* API: Events: Return channel id from the API discover requestThiago de Arruda2014-05-26
| | | | | This refactors msgapck_rpc_{dipatch,call} to receive the channel id as argument. Now the discovery request returns the [id, metadata] array.
* Remove hardcoded type names from msgpack-gen.luaThiago de Arruda2014-05-17
| | | | | Except for the `Error *` type, all parameter types are valid identifiers, so reuse that LPeg rule.
* Introduce nvim namespace: Fix build process.Eliseo Martínez2014-05-15
| | | | | | | - Leave src as include dir (for includes to recognize 'nvim/' prefix). - Change subdirectory from src to src/nvim. - Fix msgpack generation. - Fix some other paths to new locations.
* Refactor API types and prototypesThiago de Arruda2014-05-12
| | | | | | | | - Split functions with multiple files in the 'api' subdirectory - Move/Add more types in the 'api/defs.h' header - Add more prototypes - Refactor scripts/msgpack-gen.lua - Move msgpack modules to 'os' subdirectory
* Add `msgpack_rpc_dispatch`/metadata generatorThiago de Arruda2014-04-11
This adds a lua script which parses the contents of 'api.h'. After the api is parsed into a metadata table. After that, it will generate: - A msgpack blob for the metadata table. This msgpack object contains everything scripting engines need to generate their own wrappers for the remote API. - The `msgpack_rpc_dispatch` function, which takes care of validating msgpack requests, converting arguments to C types and passing control to the appropriate 'api.h' function. The result is then serialized back to msgpack and returned to the client. This approach was used because: - It automatically modifies `msgpack_rpc_dispatch` to reflect API changes. - Scripting engines that generate remote call wrappers using the msgpack metadata will also adapt automatically to API changes