Skip to content

Java/C# Generic Arguments and Parameters Are Not Expressions #41

Description

@jsipahio

Currently generic arguments and parameters are expected to be expressions, like: <argument><expr><name>int</name></expr></argument>
However, in C# and Java they are marked up without the expression tag: <argument><name>int</name></argument>
There needs to be logic to handle if the argument/parameter is a name without being wrapped by an expression. Additionally, Java has <parameter_list type="generic"/> so that should be considered for generics.

Activity

  1. jsipahio commented on Jul 20, 2025

    @jsipahio
    Author

    Issue 41 branch assumes that Java markup will be fixed at some point to label class generic parameter lists with type="generic'.
    The only outstanding issue is Java generic functions. The generic parameter list is in the type, but not a part of the name, as seen here: <T> void is marked up as <type><parameter_list type="generic"><parameter><name>T</name></parameter></parameter_list> <name>void</name></type>. This creates a conflict with the generic handler for the name.

  2. mjdecker commented on Oct 14, 2025

    @mjdecker
    Contributor

    From the srcML test suite, parameter list and argument lists have the type=generic. Anyway, thanks for identifying this. I will look into it and review the proposed solution

  3. mjdecker commented on Oct 14, 2025

    @mjdecker
    Contributor

    I am going to have to think how I want this handled a bit. There is code I can use, but the argument shouldn't be handling parameter data. I also don't think I want the generic data on the name element, but forwarded to the class/method.

  4. mjdecker commented on Oct 14, 2025

    @mjdecker
    Contributor

    I also will probably change this into two issues. 1 for arguments and 1 for generic parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions