| 473 | // Parse a "type id" and return "type" (and re-parse "id" in caller) or |
| 474 | // return null. |
| 475 | private Type type() { |
| 476 | int old = _lexer._position; |
| 477 | String tname = _lexer.matchId(); |
| 478 | if( tname==null ) return null; |
| 479 | boolean nullable = match("?"); |
| 480 | Type t = TYPES.get(tname); |
| 481 | // Assume a forward-reference type |
| 482 | if( t == null ) { |
| 483 | int old2 = _lexer._position; |
| 484 | String id = _lexer.matchId(); |
| 485 | if( id==null ) { |
| 486 | _lexer._position = old; |
| 487 | return null; |
| 488 | } |
| 489 | TYPES.put(tname,t = TypeStruct.make(tname)); |
| 490 | _lexer._position = old2; // Reparse ID in caller |
| 491 | } |
| 492 | return t instanceof TypeStruct obj ? TypeMemPtr.make(obj,nullable) : t; |
| 493 | } |
| 494 | |
| 495 | |
| 496 | /** |