| 370 | } |
| 371 | |
| 372 | void ParseGenericEnd(Lexeme** str) |
| 373 | { |
| 374 | // If it was '>>' which is now looks like '>', then check it back |
| 375 | if((*str)->type == lex_greater && (*str)->length == 2) |
| 376 | { |
| 377 | (*str)->type = lex_shr; |
| 378 | (*str)++; |
| 379 | return; |
| 380 | } |
| 381 | if(!ParseLexem(str, lex_greater)) |
| 382 | { |
| 383 | if((*str)->type == lex_shr) // if we have '>>' |
| 384 | (*str)->type = lex_greater; // "parse" half of it and replace lexeme with '>' while preserving original length to restore later |
| 385 | else |
| 386 | ThrowError((*str)->pos, "ERROR: '>' expected after generic type alias list"); |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | // allowArray allows parsing of array types. It is disabled when parsing a type for "new" expression |
| 391 | // allowGenericType is used in parsing of generic function declaration, it allows parts of types to be "generic" |
no test coverage detected