diff options
author | oni-link <knil.ino@gmail.com> | 2015-05-02 13:10:59 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-05-04 23:23:06 -0400 |
commit | 34b5cee533e457cb72314a0fcca4c227bde8487a (patch) | |
tree | 2be34bcadc3929293b3c42caf1e08419771c259c /scripts/gendeclarations.lua | |
parent | d6209fa9f031658a9750efee12733f64ab32074e (diff) | |
download | rneovim-34b5cee533e457cb72314a0fcca4c227bde8487a.tar.gz rneovim-34b5cee533e457cb72314a0fcca4c227bde8487a.tar.bz2 rneovim-34b5cee533e457cb72314a0fcca4c227bde8487a.zip |
Fix compiling with gcc 5. #2566
Pattern matching failed, because the preprocessor added additional
linemarkers around type Bool.
Diffstat (limited to 'scripts/gendeclarations.lua')
-rwxr-xr-x | scripts/gendeclarations.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/gendeclarations.lua b/scripts/gendeclarations.lua index 9398bbb31c..4e74e4e301 100755 --- a/scripts/gendeclarations.lua +++ b/scripts/gendeclarations.lua @@ -87,6 +87,15 @@ local spaces = any_amount(branch( any_character )), lit('\n') + ), + -- Linemarker inserted by preprocessor + concat( + lit('# '), + any_amount(concat( + neg_look_ahead(lit('\n')), + any_character + )), + lit('\n') ) )) local typ_part = concat( @@ -206,6 +215,8 @@ while init ~= nil do declaration = declaration:gsub('/%*.-%*/', '') declaration = declaration:gsub('//.-\n', '\n') + declaration = declaration:gsub('# .-\n', '') + declaration = declaration:gsub('\n', ' ') declaration = declaration:gsub('%s+', ' ') declaration = declaration:gsub(' ?%( ?', '(') @@ -220,6 +231,7 @@ while init ~= nil do else non_static = non_static .. declaration end + init = e end end end |