From 32b612246015501c8e62c45f918542d4188792ce Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 16 May 2014 08:00:31 -0300 Subject: Remove hardcoded type names from msgpack-gen.lua Except for the `Error *` type, all parameter types are valid identifiers, so reuse that LPeg rule. --- scripts/msgpack-gen.lua | 13 +------------ 1 file changed, 1 insertion(+), 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)) -- cgit