Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Represent declared type dimensions #842

Open
Gabriel-Darbord opened this issue Oct 18, 2024 · 0 comments
Open

Represent declared type dimensions #842

Gabriel-Darbord opened this issue Oct 18, 2024 · 0 comments

Comments

@Gabriel-Darbord
Copy link
Member

Gabriel-Darbord commented Oct 18, 2024

In typed languages, typed entities can be declared as arrays with dimensions:

int[] a; // 1 dimension
int[][] b; // 2 dimensions
int[][][] c; // 3 dimensions
int f() [] { ... } // 1 dimension, and yes the array brackets can appear after the parentheses in Java

We should add a dimensions field to hold the number of dimensions, which defaults to 0.
The field can be either be in FamixTTypedEntity, or in a new FamixTWithDimensions trait.
Since FamixTTypedEntity is currently used even for dynamic language entities, this may not be the right choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant