fix: cpp domain parser cannot parse 'static constexpr' declarations. closes #1038

This commit is contained in:
Takayuki Shimizukawa committed 2012-11-28 15:49:06 +09:00
1 parent 4e715ff0bf
commit f24b1998f2
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -852,7 +852,7 @@ class DefinitionParser(object):
visibility = 'public'
if self.match(_visibility_re):
visibility = self.matched_text
static = self.skip_word('static')
static = self.skip_word_and_ws('static')
return visibility, static
def parse_type(self):
+3
View File
@@ -60,6 +60,9 @@ def test_type_definitions():
x = 'constexpr int get_value()'
assert unicode(parse('function', x)) == x
x = 'static constexpr int get_value()'
assert unicode(parse('function', x)) == x
x = 'int get_value() const noexcept'
assert unicode(parse('function', x)) == x