aboutsummaryrefslogtreecommitdiff
path: root/scripts/msgpack-gen.lua
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-05-16 08:00:31 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-17 08:05:44 -0300
commit32b612246015501c8e62c45f918542d4188792ce (patch)
treeb567e06d283f90eab6095521d10140e2d51e9a9b /scripts/msgpack-gen.lua
parentbd2ab0d8a53f0d5b5443f9709644ade451716fe3 (diff)
downloadrneovim-32b612246015501c8e62c45f918542d4188792ce.tar.gz
rneovim-32b612246015501c8e62c45f918542d4188792ce.tar.bz2
rneovim-32b612246015501c8e62c45f918542d4188792ce.zip
Remove hardcoded type names from msgpack-gen.lua
Except for the `Error *` type, all parameter types are valid identifiers, so reuse that LPeg rule.
Diffstat (limited to 'scripts/msgpack-gen.lua')
-rw-r--r--scripts/msgpack-gen.lua13
1 files changed, 1 insertions, 12 deletions
diff --git a/scripts/msgpack-gen.lua b/scripts/msgpack-gen.lua
index edf97b8cfd..d303fde2fc 100644
--- a/scripts/msgpack-gen.lua
+++ b/scripts/msgpack-gen.lua
@@ -20,18 +20,7 @@ c_id = letter * (alpha ^ 0)
c_void = P('void')
c_param_type = (
((P('Error') * fill * P('*') * fill) * Cc('error')) +
- (C(P('bool')) * (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(c_id) * (ws ^ 1))
)
c_type = (C(c_void) * (ws ^ 1)) + c_param_type
c_param = Ct(c_param_type * C(c_id))