diff options
author | Mathieu Féry <[email protected]> | 2023-08-08 11:31:46 +0200 |
---|---|---|
committer | Mathieu Féry <[email protected]> | 2023-08-08 12:05:57 +0200 |
commit | 496df9c41332a0d606017f0df5ba08b02af0c992 (patch) | |
tree | 470491bb7cabcb5a9fe4f13a5cd54ad29e867005 /src/antlr/com | |
parent | 0e6d18c6b6d46b54e679ce0c44613e21e58245f2 (diff) |
feat(generation): Fix generic parsing inside JavaParser.g to allow parsing of java callback implementation
Diffstat (limited to 'src/antlr/com')
-rw-r--r-- | src/antlr/com/jogamp/gluegen/jgram/JavaParser.g | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/antlr/com/jogamp/gluegen/jgram/JavaParser.g b/src/antlr/com/jogamp/gluegen/jgram/JavaParser.g index a4d8c72..85f24d3 100644 --- a/src/antlr/com/jogamp/gluegen/jgram/JavaParser.g +++ b/src/antlr/com/jogamp/gluegen/jgram/JavaParser.g @@ -266,7 +266,13 @@ typeSpec[boolean addImagNode] // A class type specification is a class type with possible brackets afterwards // (which would make it an array type). classTypeSpec[boolean addImagNode] - : identifier (LT gen:classTypeSpec[false] GT)? (lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);} RBRACK!)* + : identifier (LT + ( + classTypeSpec[false] + | + QUESTION ("extends" classTypeSpec[false] (BAND classTypeSpec[false])*)? + ) GT + )? (lb:LBRACK^ {#lb.setType(ARRAY_DECLARATOR);} RBRACK!)* { if ( addImagNode ) { #classTypeSpec = #(#[TYPE,"TYPE"], #classTypeSpec); |