diff options
Diffstat (limited to 'src/antlr/com/jogamp')
-rw-r--r-- | src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g index 9ec3b9b..8826c13 100644 --- a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g +++ b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g @@ -520,7 +520,13 @@ parameterDeclaration returns [ParameterDeclaration pd] { : #( NParameterDeclaration tb = declSpecifiers (decl = declarator[tb] | nonemptyAbstractDeclarator[tb])? - ) { pd = new ParameterDeclaration(decl, tb.type()); } + ) { + if( null == tb ) { + throwGlueGenException(parameterDeclaration_AST_in, + String.format("Undefined type for declaration '%s'", decl)); + } + pd = new ParameterDeclaration(decl, tb.type()); + } ; functionDef { |