mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix compiling with gcc 5. #2566
Pattern matching failed, because the preprocessor added additional linemarkers around type Bool.
This commit is contained in:
parent
d6209fa9f0
commit
34b5cee533
@ -87,6 +87,15 @@ local spaces = any_amount(branch(
|
|||||||
any_character
|
any_character
|
||||||
)),
|
)),
|
||||||
lit('\n')
|
lit('\n')
|
||||||
|
),
|
||||||
|
-- Linemarker inserted by preprocessor
|
||||||
|
concat(
|
||||||
|
lit('# '),
|
||||||
|
any_amount(concat(
|
||||||
|
neg_look_ahead(lit('\n')),
|
||||||
|
any_character
|
||||||
|
)),
|
||||||
|
lit('\n')
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
local typ_part = concat(
|
local typ_part = concat(
|
||||||
@ -206,6 +215,8 @@ while init ~= nil do
|
|||||||
declaration = declaration:gsub('/%*.-%*/', '')
|
declaration = declaration:gsub('/%*.-%*/', '')
|
||||||
declaration = declaration:gsub('//.-\n', '\n')
|
declaration = declaration:gsub('//.-\n', '\n')
|
||||||
|
|
||||||
|
declaration = declaration:gsub('# .-\n', '')
|
||||||
|
|
||||||
declaration = declaration:gsub('\n', ' ')
|
declaration = declaration:gsub('\n', ' ')
|
||||||
declaration = declaration:gsub('%s+', ' ')
|
declaration = declaration:gsub('%s+', ' ')
|
||||||
declaration = declaration:gsub(' ?%( ?', '(')
|
declaration = declaration:gsub(' ?%( ?', '(')
|
||||||
@ -220,6 +231,7 @@ while init ~= nil do
|
|||||||
else
|
else
|
||||||
non_static = non_static .. declaration
|
non_static = non_static .. declaration
|
||||||
end
|
end
|
||||||
|
init = e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user