tree-sitter: implement query functionality and highlighting prototype [skip.lint]

This commit is contained in:
Björn Linse
2019-09-28 14:27:20 +02:00
parent c21511b2f4
commit 440695c296
18 changed files with 1293 additions and 151 deletions

View File

@@ -192,7 +192,7 @@ end
-- the real API.
for i = 1, #functions do
local fn = functions[i]
if fn.impl_name == nil then
if fn.impl_name == nil and not fn.lua_only then
local args = {}
output:write('Object handle_'..fn.name..'(uint64_t channel_id, Array args, Error *error)')
@@ -310,12 +310,13 @@ void msgpack_rpc_init_method_table(void)
for i = 1, #functions do
local fn = functions[i]
output:write(' msgpack_rpc_add_method_handler('..
'(String) {.data = "'..fn.name..'", '..
'.size = sizeof("'..fn.name..'") - 1}, '..
'(MsgpackRpcRequestHandler) {.fn = handle_'.. (fn.impl_name or fn.name)..
', .fast = '..tostring(fn.fast)..'});\n')
if not fn.lua_only then
output:write(' msgpack_rpc_add_method_handler('..
'(String) {.data = "'..fn.name..'", '..
'.size = sizeof("'..fn.name..'") - 1}, '..
'(MsgpackRpcRequestHandler) {.fn = handle_'.. (fn.impl_name or fn.name)..
', .fast = '..tostring(fn.fast)..'});\n')
end
end
output:write('\n}\n\n')