tree-sitter-java icon indicating copy to clipboard operation
tree-sitter-java copied to clipboard

No visibility node

Open Alphapage opened this issue 7 months ago • 0 comments

Hello,

I find it difficult to get the visibility of any function because there is no node for this kind:

@Override(FLAG)
    @Override
    @Override
    public @NonNull @NonNull int myFunc() {
        
    }

s-exp:

[method_declaration] [227, 1] - [232, 5]
        [modifiers] [227, 1] - [230, 28]
          [annotation] [227, 1] - [227, 16]
            name: [identifier] [227, 2] - [227, 10]
            arguments: [annotation_argument_list] [227, 10] - [227, 16]
              [identifier] [227, 11] - [227, 15]
          [marker_annotation] [228, 4] - [228, 13]
            name: [identifier] [228, 5] - [228, 13]
          [marker_annotation] [229, 4] - [229, 13]
            name: [identifier] [229, 5] - [229, 13]
          [marker_annotation] [230, 11] - [230, 19]
            name: [identifier] [230, 12] - [230, 19]
          [marker_annotation][230, 20] - [230, 28]
            name: [identifier] [230, 21] - [230, 28]
        type: [integral_type] [230, 29] - [230, 32]
        name: [identifier] [230, 33] - [230, 39]
        parameters: [formal_parameters] [230, 39] - [230, 41]
        body: [block] [230, 42] - [232, 5]

Do you plan to provide such a node ? Otherwise, how to get the visibility using rust code for example.

Thank you in advance for your help.

Alphapage avatar Jun 03 '25 18:06 Alphapage