[code-reflection] RFR: Add support for more types [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Apr 26 10:21:08 UTC 2024
On Thu, 25 Apr 2024 19:00:28 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> I am wondering if instead we can check `#`, and the parsers job is dumbly accumulate all valid characters (selected tokens and identifiers) up to but not including the `<` token. We could even check if there is quoted string for the type identifier.
>>
>> Note the special code for arrays in the parser was added only to avoid updating many tests.
>
> I can take a look
Uploaded a new iteration with this simplification (which looks much nicer than what I had):
8ad6110bdb3c099b1421a04272c56685dd551f95
Note that if we wanted a truly general "quoting" mechanism we'd need both a prefix and a suffix token. Otherwise one can only use quotes if there's some nested type-definition with `<>`. Your idea of using just strings (e.g. surrounded with `"`) seems a powerful one (and more robust in the long run), because it would make the desc parsing logic a lot less opinionated (e.g. we wouldn't even need to special case qualified identifiers).
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/51#discussion_r1580816905
More information about the babylon-dev
mailing list