mirror of
https://github.com/neovim/neovim.git
synced 2025-12-17 03:45:42 +00:00
Remove hardcoded type names from msgpack-gen.lua
Except for the `Error *` type, all parameter types are valid identifiers, so reuse that LPeg rule.
This commit is contained in:
@@ -20,18 +20,7 @@ c_id = letter * (alpha ^ 0)
|
|||||||
c_void = P('void')
|
c_void = P('void')
|
||||||
c_param_type = (
|
c_param_type = (
|
||||||
((P('Error') * fill * P('*') * fill) * Cc('error')) +
|
((P('Error') * fill * P('*') * fill) * Cc('error')) +
|
||||||
(C(P('bool')) * (ws ^ 1)) +
|
(C(c_id) * (ws ^ 1))
|
||||||
(C(P('int64_t')) * (ws ^ 1)) +
|
|
||||||
(C(P('double')) * (ws ^ 1)) +
|
|
||||||
(C(P('StringArray')) * (ws ^ 1)) +
|
|
||||||
(C(P('String')) * (ws ^ 1)) +
|
|
||||||
(C(P('Buffer')) * (ws ^ 1)) +
|
|
||||||
(C(P('Window')) * (ws ^ 1)) +
|
|
||||||
(C(P('Tabpage')) * (ws ^ 1)) +
|
|
||||||
(C(P('Object')) * (ws ^ 1)) +
|
|
||||||
(C(P('Position')) * (ws ^ 1)) +
|
|
||||||
(C(P('Array')) * (ws ^ 1)) +
|
|
||||||
(C(P('Dictionary')) * (ws ^ 1))
|
|
||||||
)
|
)
|
||||||
c_type = (C(c_void) * (ws ^ 1)) + c_param_type
|
c_type = (C(c_void) * (ws ^ 1)) + c_param_type
|
||||||
c_param = Ct(c_param_type * C(c_id))
|
c_param = Ct(c_param_type * C(c_id))
|
||||||
|
|||||||
Reference in New Issue
Block a user