aboutsummaryrefslogtreecommitdiff
path: root/test/unit/formatc.lua
diff options
context:
space:
mode:
authorNicolas Hillegeer <nicolas@hillegeer.com>2014-07-22 21:08:20 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-07-27 14:00:44 -0300
commit10479fd2330341364a2721ee509e6b73ff2b3152 (patch)
tree275f8318159a921ea02570d27d7e4005c17d99d2 /test/unit/formatc.lua
parent115b165bfa6bc1f85e6c6a8789ef49920b409822 (diff)
downloadrneovim-10479fd2330341364a2721ee509e6b73ff2b3152.tar.gz
rneovim-10479fd2330341364a2721ee509e6b73ff2b3152.tar.bz2
rneovim-10479fd2330341364a2721ee509e6b73ff2b3152.zip
test/formatc: improve 'inline' function handling
Apple seems to define some functions as `inline` but not `static` in headers. The ghetto parser wasn't unbelievably happy with this.
Diffstat (limited to 'test/unit/formatc.lua')
-rw-r--r--test/unit/formatc.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/formatc.lua b/test/unit/formatc.lua
index e63ff369f2..c010738ebb 100644
--- a/test/unit/formatc.lua
+++ b/test/unit/formatc.lua
@@ -176,9 +176,10 @@ local function formatc(str)
end_at_brace = false
end
elseif typ == 'identifier' then
- -- static usually indicates an inline header function, which has no
- -- trailing ';', so we have to add a newline after the '}' ourselves.
- if token[1] == 'static' then
+ -- static and/or inline usually indicate an inline header function,
+ -- which has no trailing ';', so we have to add a newline after the
+ -- '}' ourselves.
+ if token[1] == 'static' or token[1] == 'inline' then
end_at_brace = true
end
elseif typ == 'preprocessor' then