Skip to content

Commit

Permalink
Merge pull request #56 from Darkyenus/interface-block-fix
Browse files Browse the repository at this point in the history
Fix #54. Don't hang on incomplete interface blocks
  • Loading branch information
Darkyenus committed May 7, 2015
2 parents 410e550 + a7449d6 commit 1794d49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/glslplugin/lang/parser/GLSLParsing.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ private boolean parseExternalDeclaration() {
if (b.getTokenType() == RIGHT_BRACE) {
b.error("Empty interface block is not allowed.");
}

while (!tryMatch(RIGHT_BRACE)) {
while (!tryMatch(RIGHT_BRACE) && !eof()) {
final PsiBuilder.Marker member = b.mark();
parseQualifierList(true);
if (!parseTypeSpecifier()) advanceLexer();
if (!parseTypeSpecifierNoArray()) advanceLexer();
parseDeclaratorList();
match(SEMICOLON, "Expected ';'");
member.done(STRUCT_DECLARATION);//TODO Should we call interface block members struct members?
Expand Down

0 comments on commit 1794d49

Please sign in to comment.