Skip to content

Commit c6760df

Browse files
committed
* Fix Parser error on member variables with initializers plus Info.skip() (issue #179)
1 parent b5378cf commit c6760df

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
* Fix `Parser` error on member variables with initializers plus `Info.skip()` ([issue #179](https://github.com/bytedeco/javacpp/issues/179))
23
* Fix `Parser` incorrectly recognizing values as pointers when `const` is placed after type ([issue #173](https://github.com/bytedeco/javacpp/issues/173))
34
* Add `Parser` support for C++11 `using` declarations that act as `typedef` ([issue #169](https://github.com/bytedeco/javacpp/issues/169))
45
* Let `Parser` accept variables initialized with parentheses ([issue #179](https://github.com/bytedeco/javacpp/issues/179))

src/main/java/org/bytedeco/javacpp/tools/Parser.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,10 @@ boolean variable(Context context, DeclarationList declList) throws ParserExcepti
18531853
if (info != null && info.skip) {
18541854
decl.text = spacing;
18551855
declList.add(decl);
1856+
while (!tokens.get().match(Token.EOF, ';')) {
1857+
tokens.next();
1858+
}
1859+
tokens.next();
18561860
return true;
18571861
} else if (info == null) {
18581862
Info info2 = infoMap.getFirst(dcl.cppName);

0 commit comments

Comments
 (0)